AI Infra Interviews logo
Where values live · free reference

Local memory

CUDA local memory is a thread-private address space whose storage is backed by device memory and caches. Despite its name, it is not the fast on-chip shared-memory region.

Register spillSpill memory

How it works

The compiler can use local memory for spills, large thread-local arrays or values it cannot keep in registers. Neighboring threads’ accesses may still benefit from the memory system’s layout and caching.

Work through an example

Forcing a lower register limit may admit more resident warps but introduce local loads and stores. If those extra accesses cost more than the latency hiding gains, the kernel slows down.

Where the term can mislead

Local-memory use is evidence to inspect, not automatic proof of a spill-induced bottleneck. Some thread-local storage is required by the algorithm.

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.

  1. NVIDIA CUDA Programming Guide: writing SIMT kernels ↗
  2. NVIDIA CUDA C++ Best Practices Guide ↗