The roofline model in plain language, without the chart, what is it saying?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Roofline plots achievable FLOP/s against arithmetic intensity. Two ceilings (peak compute, peak bandwidth) cap performance; where a kernel sits says compute-bound or bandwidth-bound.
Imagine a factory has two limits. The first is how many workers it has (compute). The second is how fast trucks can deliver raw materials (bandwidth). If your product needs only a few materials but tons of assembly work, workers are the bottleneck. If it needs tons of materials but barely any assembly, the trucks are the bottleneck. The roofline is a picture that puts both limits on one chart and lets you see at a glance which one is choking your factory. For LLM inference, prefill is worker-bound (compute), and decode is truck-bound (bandwidth).
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: arithmetic intensity definition + two ceilings + knee + LLM prefill vs decode positions + optimization levers by regime + FlashAttention tiling and cache-aware extensions.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Conflating high FLOP/s with good performance. Hitting the bandwidth ceiling means you cannot go faster regardless of how many FLOPs your kernel does.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.