← All questions
Question 4 · Choose any 2 of questions 2, 3 and 4 · Due Friday, 20 November 2026, 11:59 pm IST

The GPU roofline plot

Explain the roofline model from first principles: the two limits of a GPU (peak compute in FLOP/s and memory bandwidth in bytes/s), what arithmetic intensity is, and why it decides how much of the GPU you actually use. Work through real examples.

New to this topic? That is completely fine. It is completely fine if you have never studied some of these topics before. We want to see how fast you can learn something new, grasp it, and teach it from first principles.

This page is a quick primer, not a script. Use it to get your bearings, then read the links below and anything else you find: other blogs, papers, videos, code. We are judging the story you build, your examples and metaphors, your first-principles thinking, and any experiments you run yourself.

A quick primer

A GPU has two hard limits. It can only do so many calculations per second, and it can only move so many bytes from memory per second. Every program you run is held back by one of the two. The roofline plot shows which one, at a glance.

The two limits (NVIDIA H100 SXM, dense BF16)

Both are fixed by the hardware. What you control is the arithmetic intensity: how much useful maths you do for every byte you move.

arithmetic intensity=FLOPs performedbytes movedattainable FLOP/s=min⁡(peak FLOP/s, bandwidth×intensity)\text{arithmetic intensity} = \frac{\text{FLOPs performed}}{\text{bytes moved}} \qquad \text{attainable FLOP/s} = \min\big(\text{peak FLOP/s},\ \text{bandwidth} \times \text{intensity}\big)
0.11101001000100000.11101001000arithmetic intensity (FLOP per byte moved) — log scaleTFLOP/s — log scalememory-bound: 3.35 TB/s × AIcompute roof: 989 TFLOP/sridge ≈ 295elementwise addLLM decode, batch 1decode, batch 644096³ matmul
The roofline for an H100. Left of the ridge (shaded), you are waiting on memory. Right of it, you are using the full compute. Points are worked examples from the table below.

The ridge point is where the two limits meet: 989×1012 / 3.35×1012≈295989 \times 10^{12} \,/\, 3.35 \times 10^{12} \approx 295 FLOP per byte. A kernel needs roughly 295 operations for every byte it reads to keep the GPU fully busy.

Operation (BF16, 2 bytes per number)FLOPsBytes movedIntensityVerdict
Add two vectors, c=a+bc = a + b1 per element6 per element≈ 0.17Memory-bound. About 0.56 TFLOP/s: under 0.1% of peak.
LLM decode, batch 1 (matrix × vector)2d22d^2≈ 2d22d^2 (the weights)≈ 1Memory-bound. Why generating tokens one at a time is slow.
Decode with batch BB2Bd22Bd^2≈ 2d22d^2≈ BBBatching raises intensity: the weights are read once for BB users.
Square matmul, N=4096N = 40962N32N^33×2N23 \times 2N^2N/3≈1365N/3 \approx 1365Compute-bound. This is what GPUs are built for.

Questions worth exploring

Read

Watch

Go beyond this list. These are starting points. The best submissions usually bring in something we did not link: an experiment, a paper, a story of their own.

Any doubts or questions?

Just email us. We read every message and are happy to help.

rajatdandekar@vizuara.com