Hide latency with eligible work · 10 min
How warps are scheduled
When one warp waits, a scheduler can issue instructions from another ready warp, keeping execution units busy.
Plain language, the core causal flow, and required checks.
Ready work hides waiting
A warp contains 32 CUDA threads. At an instruction-issue opportunity, a warp scheduler chooses an eligible warp whose operands and execution resources are ready.
If a warp is stalled on memory or a dependency, another resident warp can issue. This rapid interleaving is how GPU concurrency hides latency without making the original memory operation itself faster.
High theoretical occupancy only creates the opportunity to hide latency. Dependencies, divergence, and instruction mix determine achieved utilization.
One instruction stream, different lane decisions
CUDA threads hold individual state, but the threads in a warp issue together. When a branch divides the warp, hardware masks the lanes for one path, then the other, before reconverging. Divergence is expensive when both paths contain substantial work.
Interactive explanation
Simulate warp divergence
SIMT and divergence
Watch one warp execute two branch paths under masks
Threads keep individual data and branch decisions, but a warp issues one shared instruction stream. Divergent paths therefore run one after the other.
Interactive explanation
Schedule eligible warps
Warp scheduling
Watch one scheduler partition hide a memory wait
This trace follows one simplified scheduler partition. A memory request can remain in flight while an independent warp uses an arithmetic pipeline.
The scoreboard sees two eligible warps.
Two warps are eligible; no instruction has issued.
- Explain eligible versus stalled warps.
- Describe how concurrency hides latency.
Core check
How does a GPU hide a long memory wait?
Terms in this chapter
- Warp
- A group of 32 CUDA threads scheduled together for instruction execution.
Primary references
- CUDA Programming Model ↗NVIDIA
Primary reference for grids, blocks, SM assignment, warps, and SIMT execution.