◄ Wiki / Graphics
shared memory
Fast scratch memory that a group of GPU threads can all read and write to cooperate.
In a compute shader, threads are organized into workgroups, and shared memory is a small, fast region visible to every thread in one workgroup. They use it to exchange partial results and coordinate — far quicker than going through global memory — which is key for algorithms like reductions, prefix sums, and tiled matrix math. Access must be synchronized to avoid races.