Device to streaming multiprocessor · 9 min
Zoom into GPU anatomy
A GPU contains many streaming multiprocessors that execute large numbers of related threads while sharing a memory hierarchy.
Plain language, the core causal flow, and required checks.
Why the GPU is built differently
A CPU devotes substantial silicon to sophisticated control, large caches, and fast execution of a small number of threads. A GPU accepts more latency per thread and devotes far more of its area to parallel arithmetic. That trade only pays when the workload exposes enough independent, regular work.
Interactive explanation
Compare CPU and GPU execution
Latency versus throughput
Run the same work on a few wide CPU cores and many GPU lanes
The workload changes the dependency graph. Many lanes help only when enough independent, regular work is ready at the same time.
A hierarchy built for throughput
High-bandwidth memory holds weights, KV-cache blocks, and working tensors. Cache and memory controllers feed many streaming multiprocessors, usually called SMs.
An SM contains warp schedulers, execution pipelines, registers, and shared memory. Many warps can remain resident so the scheduler has other eligible work when one warp waits on a dependency or memory.
Two hierarchies meet inside the GPU. The hardware hierarchy is GPU → SM → scheduler → execution and memory pipelines. The work hierarchy is kernel grid → block → threads → warps. Hardware admits a complete block to one SM, groups its threads into warps, and lets a scheduler choose eligible warps for instruction issue. Blocks and warps are assigned work, not permanent physical layers.
Exact unit counts vary by GPU generation. The durable mental model is how the work hierarchy maps onto the hardware hierarchy.
Interactive explanation
Zoom into a GPU
GPU anatomy
Zoom through hardware while following the work mapped onto it
Hardware and work are related but different hierarchies. Blocks and warps are assigned work; SMs, schedulers, pipelines, and memory are hardware.
- Locate HBM, cache, streaming multiprocessors, and execution units.
- Explain why GPUs favor throughput.
Core check
Where do resident thread blocks execute?
Terms in this chapter
- Streaming multiprocessor (SM)
- A GPU compute neighborhood containing schedulers, execution pipelines, registers, and shared memory.
Primary references
- CUDA Programming Model ↗NVIDIA
Primary reference for grids, blocks, SM assignment, warps, and SIMT execution.