The kitchen building itself
We've talked about the pantry and the van for the whole course. Now look at the building. Once you see the floor plan, every optimization you've met — decode being slow, fusion, big batches — becomes obvious.
Three parts, one floor plan
A modern GPU is just three kinds of thing wired together: compute units (the SMs, where your code actually runs), one matrix-multiply engine per unit (the Tensor Core), and a memory hierarchy that trades capacity for speed. Learn those three and the chip stops being a black box.
This is Part V — The Hardware
Earlier parts treated the GPU as a fast box you feed work to. From here on we open the lid. This lesson is the floor plan; the next ones (GPU generations, MIG) build on it.
Keywords — tap to unfold the plain meaning
A GPU is three things: ~130 SM cook-stations, a Tensor Core appliance in each, and a memory hierarchy from tiny SRAM up to the big HBM pantry.
The SM: where kernels run
"The GPU runs your code" really means: your kernels are chopped up and scheduled across ~130 SMs. Understanding one SM is understanding how work actually lands on the chip.
~130 cook stations
An H100 NVL has about 130 Streaming Multiprocessors (SMs). Each SM holds general-purpose CUDA cores (the everyday tools) plus one Tensor Core. Your kernels are scheduled across these SMs — fill them and the chip is busy; starve them and it idles.
Warps: 32 threads in lockstep
Each SM runs threads in groups of 32 called warps, in lockstep — all 32 execute the same instruction at once. This is the real unit of work on a GPU, not a single thread.
Hiding the wait
The GPU hides memory latency by swapping in another warp whenever one is waiting on data from memory. So while one warp stalls reading from HBM, the SM keeps busy on a different warp. Keeping enough warps in flight is how you keep the SM full.
Keywords — tap to unfold the plain meaning
An SM runs warps of 32 threads in lockstep and hides memory latency by switching to another waiting warp. Keep the SMs full and the GPU earns its keep.
Tensor Cores: why GPUs are fast at LLMs
An LLM is, underneath, a tower of matrix multiplies. The Tensor Core is the appliance built to do exactly that — and nothing makes a GPU faster at LLMs than feeding it well.
The matrix-multiply appliance
Alongside the general CUDA cores, each SM has one Tensor Core: a unit specialized for the matrix multiplies that dominate an LLM's forward pass. CUDA cores are the chef's knife; the Tensor Core is the stand mixer built for one job and brutally fast at it.
FP8 on Hopper
On Hopper, Tensor Cores run FP8 via the Transformer Engine — which is exactly why FP8 is so fast on your hardware. The narrower the number format the appliance natively supports, the more matrix-multiply throughput you get per second.
Keywords — tap to unfold the plain meaning
FP8 matrix-multiply support. The format isn't just smaller in memory — the appliance is wired to chew it at full speed.
One Tensor Core per SM does the matrix multiplies an LLM is made of. On Hopper it runs FP8 through the Transformer Engine — the hardware reason FP8 is fast.
The memory hierarchy: capacity vs bandwidth
There is no free fast-and-big memory. The whole game of inference performance is keeping the data you're reusing as close to the cutting board as possible.
SRAM — the cutting board
On each SM sits SRAM (registers and shared memory): tiny, but instant — roughly ~19 TB/s. It's the cutting board right under the cook's hands. Data living here is essentially free to reuse.
L2 — the shared shelf
Between the stations and the pantry is a shared L2 cache of about ~50 MB. All SMs share it. It's a middle shelf — bigger than the cutting board, slower, but far closer than the pantry.
HBM — the pantry
HBM is the pantry: about ~94 GB of HBM3 at ~3.9 TB/s. Huge — it's where the weights and KV cache live — but a long walk away. Every trip you avoid is time saved.
Keywords — tap to unfold the plain meaning
The hierarchy, decoded — fast & small → big & slow
- SRAMon-SM registers / shared memory; ~19 TB/s — about 5× HBM's bandwidth, but holds only kilobytes
- L2~50 MB shared by all SMs; a middle tier between the cutting board and the pantry
- HBM~94 GB HBM3 at ~3.9 TB/s; vast capacity, but the farthest and slowest to reach
Read it as a ladder: the closer to the SM, the faster but smaller. SRAM is ~19 TB/s but tiny; HBM is ~94 GB but only ~3.9 TB/s. Keeping reused data in SRAM instead of re-fetching from HBM is the core trick.
Registers/SRAM (~19 TB/s) → L2 (~50 MB) → HBM (~94 GB, ~3.9 TB/s). Fast means small and close; big means far and slow. Avoid pantry trips.
Tie it back: the whole course in one chip
This is the payoff. Every big optimization in the course was really a statement about this floor plan all along — you just hadn't seen the building yet.
Decode is memory-bound = waiting on HBM
In decode, you do little math per byte read, so the SMs sit idle waiting on the HBM pantry. That's what "memory-bound" means physically: the appliance is starved because ingredients arrive slowly from far away.
Fusion / FlashAttention keep data in SRAM
Kernel fusion and FlashAttention win by keeping intermediate data on the cutting board (SRAM) instead of round-tripping it to HBM. Fewer pantry trips, less stalling.
Batching keeps the SMs busy
Large batches give each SM more independent work — more warps in flight — so the cook stations stay full and the Tensor Cores stay fed. That's why throughput climbs with batch size.
Keywords — tap to unfold the plain meaning
The ridge, decoded
- FLOP/bytearithmetic intensity: how much math you do for each byte you read from HBM
- ~214the ridge on your hardware — below it you're memory-bound, above it compute-bound
- decodedoes far fewer than 214 FLOP/byte, so it lands left of the ridge → HBM-bound
The roofline ridge sits at ~214 FLOP/byte on your hardware. Work below that ratio is throttled by HBM bandwidth (decode); work above it is throttled by the Tensor Cores. The whole course is moving work past the ridge.
Decode waits on HBM; fusion/FlashAttention stay in SRAM; batching keeps SMs busy. The ~214 FLOP/byte ridge says which side of memory-bound you're on.
On YOUR cluster: the H100 (Hopper), concretely
These aren't abstract specs — they're the floor plan of the exact box you serve on. Memorize this one card and the rest of Part V has something concrete to hang on.
One H100 NVL, by the numbers
Per GPU: about 130 SMs; Tensor Cores with FP8 support via the Transformer Engine; roughly ~50 MB L2 cache; and ~94 GB of HBM3 running at ~3.9 TB/s. SRAM on each SM reaches ~19 TB/s. The roofline ridge lands near ~214 FLOP/byte.
Inspect one GPU on the 4×H100 box
nvidia-smi --query-gpu=name,memory.total,memory.used --format=csv # name memory.total memory.used # NVIDIA H100 NVL 95830 MiB 1234 MiB ← ~94 GB HBM3 per GPU
Keywords — tap to unfold the plain meaning
Check yourself — teach it back (recall, don't peek)
- Explain to a colleague: "the whole course in one chip picture." What are the three parts of the GPU — and which one is each course optimization really about?
- What is a warp, and how does an SM use warps to hide memory latency?
- Order the memory tiers fast→big and give the headline number for each (SRAM, L2, HBM). Where do the weights and KV cache live?
- Why is decode memory-bound, and why does it sit left of the ~214 FLOP/byte ridge?
- Why is FP8 so fast on Hopper specifically?
Your box is 4× H100 NVL: ~130 SMs each, FP8 Tensor Cores, ~50 MB L2, ~94 GB HBM3 at ~3.9 TB/s, ridge ≈ 214 FLOP/byte. The whole course lives on this floor plan.