Shared memory
Shared memory is programmer-managed on-chip storage that cooperating threads in a block can use to exchange and reuse values.
How it works
A kernel explicitly loads data, establishes that writers have finished, and then reads the shared values. Accesses are distributed across banks. Different addresses that compete for the same bank can serialize, while supported broadcasts have different behavior.
Work through an example
A matrix tile loaded once into shared memory can supply several multiply operations. That saves repeated lower-level traffic, but larger tiles consume more shared memory and can reduce block residency.
Where the term can mislead
Shared memory is neither automatically coherent communication between arbitrary blocks nor a cache that fills itself. Synchronization and scope are part of its use.
Connect the idea
Take it into practice
Continue with the existing concept, apply it to an interview problem, or follow a course lesson. Access requirements are shown before you open a page.
New to GPUs? Start with the free execution-model concept.
Sources and scope
Examples here are teaching calculations, not measured GPU performance. Consult the linked documentation for the exact device, instruction and tool version. Source review: 25 October 2026.
