How to Improve CUDA Kernel Performance with Shared Memory Register Spilling
AI-generated summary of reporting by NVIDIA Developer Blog. Read the original for the full story.
Why it matters
CUDA developers with register-heavy kernels can now opt into a compiler pragma that cuts spill latency, typically gaining 5-10% on real HPC workloads.
NVIDIA's CUDA Toolkit version 13.0 adds a compiler option called shared memory register spilling. When a program needs more registers than the GPU chip has, the compiler used to stash the overflow in slower, off-chip memory; now it can put it in fast memory right on the chip instead. Test kernels ran about 7.8% faster, and scientific computing routines gained 5-10%. It only helps a specific class of GPU programs and must be switched on manually by the developer.
NVIDIA is shipping an opt-in compiler optimization in CUDA Toolkit 13.0 that redirects register overflow from slow off-chip memory to fast on-chip shared memory, delivering 5-10% speedups on QUDA library kernels for lattice QCD and 7.76% on NVIDIA's demo kernel. Teams running HPC or simulation workloads on GPUs can adopt it this week via a pragma. Adoption carries constraints: dynamic shared memory, debug builds and per-function compilation are unsupported, and missing launch bounds can regress performance.
CUDA 13.0's PTXAS adds the enable_smem_spilling pragma, spilling high-cost registers to on-chip shared memory instead of local memory, falling back when smem is exhausted. On a 255-register demo kernel it eliminated all 176-byte spill stores/loads, allocated 46,080 bytes smem per block, and cut duration 7.76%, elapsed cycles 7.8% and SM active cycles 19.03%; QUDA kernels gained 5-10%. It requires whole-program compilation (-rdc=false), explicit launch bounds, and static shared memory; incompatible with -G, -rdc=true and dynamic smem.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
CUDA Toolkit 13.0 PTXAS QUDA Nsight Compute enable_smem_spilling
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Samsung is testing a feature that changes the angle of photos you’ve already taken
Samsung’s new Recompose lets users change photo angles after shooting, potentially reducing the need for multiple shots and improving post-capture editing workflows for photographers and casual users alike.
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.