liveBook · Manning

Occupancy

GPU occupancy is the proportion of a processor’s supported concurrent execution capacity occupied by active threads or warps.

How 3 Manning books explain it

Grokking GPU Programming

GPU occupancy is the ratio of active warps on a streaming multiprocessor to the maximum number of warps it can support.

How it is used
Uses occupancy to reason about GPU utilization and kernel performance.
How deep it goes
Calculates occupancy from resource constraints, discusses allocation rounding, and explains why higher occupancy can hurt performance.
Examples
Uses a train analogy, numerical occupancy examples, and a worked calculation with register and shared-memory limits.
What you can do after
Diagnose GPU occupancy limits and compare kernel configurations using Nsight Compute and performance measurements.

Read how Grokking GPU Programming explains occupancy →

CUDA for LLMs

Occupancy is the ratio of active warps on a GPU streaming multiprocessor to the maximum supported number of active warps.

How it is used
Use occupancy alongside throughput and runtime to assess GPU kernel utilization and guide optimization.
How deep it goes
Compares achieved occupancy across kernels and relates it to bandwidth, parallelism, and sequential bottlenecks.
Examples
Compares naive and warp-parallel softmax, LayerNorm, and top-k kernels, plus vectorized GEMV and cuBLAS.
What you can do after
Diagnose kernel utilization with Nsight Compute and judge occupancy against bandwidth, compute, and runtime measurements.

Read how CUDA for LLMs explains occupancy →

GPU Programming with Triton

GPU occupancy is the proportion of a processor's available concurrent threads or warps that are active for execution.

How it is used
Diagnoses GPU performance effects of register allocation, fused-kernel design, and the ability to hide memory latency.
How deep it goes
Defines occupancy mathematically and explains register-driven thresholds, but stops short of detailed hardware occupancy calculations.
Examples
Uses a 64-warp SM limited to 32 active warps and relates fused kernels to register pressure and reduced global-memory traffic.
What you can do after
Diagnose/debug with it by relating register usage and fusion choices to concurrent warps, latency hiding, spills, and performance.

Read how GPU Programming with Triton explains occupancy →

What to know first

Related concepts

Questions about occupancy

What is occupancy?

GPU occupancy is the proportion of a processor’s supported concurrent execution capacity occupied by active threads or warps.

Which Manning books explain occupancy?

Grokking GPU Programming, CUDA for LLMs and GPU Programming with Triton.

What should I know before learning occupancy?

Manning books that teach occupancy usually introduce thread, hardware register, forward pass and GPU memory first.

What is the difference between occupancy and compute-bound?

GPU occupancy is the proportion of a processor’s supported concurrent execution capacity occupied by active threads or warps. A computation is compute-bound when its performance is limited primarily by processing capacity rather than memory transfer, input/output, or other resources.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.