What Is GPU Occupancy? Interpreting Theoretical and Achieved Active Warps
GPU occupancy is the number of warps or wavefronts resident on an execution unit divided by the maximum that unit can support. It indicates how much room there may be to hide memory or instruction latency by switching to other groups, but it does not directly measure compute-unit utilization or kernel speed. Instead of blindly maximizing the number, check which resource limits residency and whether other groups are ready to do work while one waits.
What Is GPU Occupancy? Interpreting Theoretical and Achieved Active Warps
GPU occupancy is the number of warps or wavefronts resident on an execution unit divided by the maximum that unit can support. It indicates how much room there may be to hide memory or instruction latency by switching to other groups, but it does not directly measure compute-unit utilization or kernel speed. Instead of blindly maximizing the number, check which resource limits residency and whether other groups are ready to do work while one waits.
What activity does occupancy measure?
GPUs execute threads in groups such as warps (NVIDIA CUDA) or wavefronts (AMD HIP). A processing unit—an SM or CU—has a limit on how many groups can reside on it at once. Occupancy is the number of active groups divided by that limit.
Occupancy = active warps/wavefronts ÷ hardware-supported maximum
Active group: resident and executing the kernel
├─ next instruction or pipeline is not ready → stalled
└─ next instruction can be issued → eligible
↓ scheduler selects it
selected → instruction issuedThis flow highlights the difference between active and eligible. AMD documentation counts a warp as active from the start of its execution until all its threads finish. An active group may still be waiting for memory, a prior result, a barrier, or an execution pipeline. It becomes eligible only when the next instruction and required pipeline are ready for the scheduler to choose. Occupancy counts active groups; it does not count how many groups can issue instructions on every cycle.
Why theoretical and achieved occupancy differ
Theoretical occupancy is the upper bound implied by the kernel launch configuration and hardware limits. Block size, register and shared-memory use, warp slots, and per-unit block/thread limits jointly determine how many groups may reside at once. A block that uses a lot of registers or shared memory leaves fewer resources available to other blocks.
Achieved occupancy is based on the active groups observed while the kernel runs. A small grid may not provide enough blocks to keep the entire device busy even if each SM/CU could support more groups. Conversely, achieved occupancy may be close to its theoretical limit while instruction throughput remains low because active groups are waiting on memory or dependencies. “How many groups could fit,” “how many were resident,” and “how many were ready to issue” are different questions.
| Value | Question it answers | Question it does not answer |
|---|---|---|
| Theoretical occupancy | How many groups can reside under the launch and resource limits? | Can those groups issue work every cycle? |
| Achieved occupancy | How many active groups resided during the measured interval? | Were execution pipelines well utilized? |
| Eligible warps/wavefronts | How many groups were ready to issue their next instruction? | Was the whole application fast? |
| Throughput and stall indicators | Is compute, memory, or dependency work limiting progress? | Will changing occupancy alone improve speed? |
The NVIDIA CUDA Best Practices Guide and AMD HIP GPU-performance documentation treat occupancy as useful for latency hiding, while warning that higher occupancy does not always mean higher performance. The number of eligible groups needed depends on memory latency, independent instructions, pipeline capacity, and the kernel. Tools, devices, and versions can aggregate measurements differently, so do not compare occupancy percentages across GPUs without checking what each metric means.
Resource limits and their costs
The first binding limit among several resources determines how many groups can reside. High register use per thread consumes the register file; large per-block shared-memory allocations leave room for fewer blocks on the same SM/CU. Block size and hardware limits on blocks, threads, and warp slots also matter. Increasing block size or reducing one resource therefore does not guarantee higher occupancy.
Consider a kernel that keeps a reusable data tile in shared memory for each block. Reducing the tile can lower the shared-memory allocation and allow more blocks to reside simultaneously. But a smaller tile may reduce data reuse, causing more global-memory reads or repeated work. Compare the new resource residency with memory traffic and total execution time.
Forcing a register limit also has a cost. Fewer registers per thread may leave room for more resident groups, but values that no longer fit can spill to local memory and add memory accesses. First inspect compiler resource reports and profiler evidence to identify the actual limit. Then try targeted code changes, such as shortening the lifetime of temporary values. A limit chosen only to raise the percentage is not evidence of an improvement.
A practical order for using occupancy in performance decisions
**Fix the target.** Record the GPU model and architecture, runtime, launch configuration, and input size. NVIDIA SMs and AMD CUs do not have identical resource layouts or execution-group widths.
**Record baseline performance and resource use.** Measure kernel time and whole-application time on the same input. Check compiler reports for registers per thread and shared memory per block. Use each vendor’s occupancy calculator and profiler according to the installed tool version.
**Compare theoretical and runtime behavior.** Treat theoretical occupancy as a clue to resource limits. Alongside achieved occupancy, inspect eligible groups, stall causes, memory bandwidth, or compute throughput to decide whether latency hiding is actually insufficient. AMD documents occupancy reporting in `rocprofv3`; NVIDIA Nsight Compute includes an occupancy calculator.
**Change one suspected limit at a time.** If shared memory is limiting residency, evaluate tile size together with data reuse. If registers are limiting, inspect compiler output, spills, and recomputation costs. When changing block size, recheck partial blocks, synchronization, and memory access.
**Recheck correctness and total time.** Verify results on the same inputs and repeatedly compare both kernel and application time before and after. Do not draw a conclusion from profiler timing alone; also measure under ordinary execution conditions.
Occupancy is a starting point for finding a bottleneck, not an optimization target by itself. If enough eligible warps are already hiding latency, or the compute pipelines or memory bandwidth are saturated, increasing occupancy may do little. If too few groups are resident and there is not enough independent work, latency may become exposed. Measure the limiting factor, check that the change did not move the cost to another resource or to memory traffic, and decide using total application time.
Sources
[NVIDIA, CUDA C++ Best Practices Guide — Occupancy and execution configuration](https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/)
[AMD, HIP Understanding GPU performance — Occupancy theory and warp execution states](https://rocm.docs.amd.com/projects/HIP/en/latest/understand/performance_optimization.html)
[AMD, HIP Performance guidelines — Measuring and improving occupancy](https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/performance_guidelines.html)