GPU Kernel & Architecture Utility
CUDA Occupancy Calculator
Model theoretical CUDA Streaming Multiprocessor (SM) warp occupancy, register allocation cliffs, and shared memory capacity across NVIDIA A100 (sm_80), L40S/4090 (sm_89), H100/H200 (sm_90), B200 (sm_100), and RTX 5090 (sm_120).
Kernel launch parameters
Test register, block-size, and shared-memory bounds locally in your browser.
NVIDIA H100 / H200 / GH200
8 warps per block
Aligned: 12,288 regs / block
32.0 KiB (max 227 KiB)
Achievable Occupancy
62.5%
40 of 64 active warps per SM
Active Blocks / SM
5
1,280 active threads / SM
Limiting Resource
Registers per thread (register file capacity)
Block Limit Breakdown
Warps: 8 | Regs: 5
SMEM: 7 | Max: 32
Register cliff guidance
Lowering register usage to at most 40 registers per thread (via --maxrregcount=40 or __launch_bounds__) allows 6 resident blocks per SM on sm_90.
Cross-architecture comparison for the same kernel launch
| Architecture | GPUs | Max Warps / SM | Max SMEM / SM | Active Blocks | Occupancy |
|---|---|---|---|---|---|
| sm_80 | NVIDIA A100 / A30 | 64 | 164 KiB | 5 | 62.5% |
| sm_89 | NVIDIA L40S / RTX 4090 / L4 | 48 | 100 KiB | 3 | 50% |
| sm_90 | NVIDIA H100 / H200 / GH200 | 64 | 228 KiB | 5 | 62.5% |
| sm_100 | NVIDIA B200 / GB200 | 64 | 228 KiB | 5 | 62.5% |
| sm_120 | NVIDIA RTX 5090 / RTX PRO 6000 Blackwell | 48 | 100 KiB | 3 | 50% |
Reading register cliffs and SMEM bottlenecks
NVIDIA GPUs allocate registers in discrete per-warp chunks (256 32-bit registers per warp on sm_80 through sm_120) and round warp counts to allocation granularities. Crossing just one extra register per thread (for example from 32 to 33 registers) can drop active blocks per SM by a step function.
CUDA occupancy FAQs
- Why does RTX 5090 (sm_120) have lower warp limits per SM than B200 (sm_100) or H100 (sm_90)?
- Workstation and consumer Blackwell (
sm_120) supports 48 warps (1,536 threads) and 100 KiB shared memory per SM, whereas data-center Hopper (sm_90) and Blackwell (sm_100) support 64 warps (2,048 threads) and 228 KiB shared memory per SM. Kernels tuned for H100 SMEM budgets can drop to zero resident blocks onsm_120if shared memory exceeds 99 KiB per block. - Does higher CUDA occupancy always improve kernel speed?
- No. Once an SM holds enough active warps to overlap arithmetic and HBM latency, forcing lower register counts via
--maxrregcountcan spill intermediate state to slow local memory. Always benchmark with Nsight Compute after adjusting occupancy bounds.