What does arithmetic intensity actually measure and what does AI near 1 imply?
Arithmetic intensity is FLOPs done per byte read from memory. High AI means compute-bound, low AI means bandwidth-bound. LLM decode sits near AI of 1, which is why it is HBM-bandwidth-limited.
Picture a worker hauling boxes from a warehouse to a workbench. Arithmetic intensity is how much actual work the worker does per box. If the worker hauls one box and does ten minutes of careful assembly on it, the bottleneck is the worker's hands, the warehouse runs idle. If the worker grabs a box, glances at it for one second, drops it, and runs back for another, the bottleneck is the path to the warehouse, the workbench sits empty most of the time. LLM decode is the second case. Each new token requires hauling the entire model out of HBM but only doing a tiny bit of math with it before fetching it all again for the next token. The path to the warehouse, HBM bandwidth, is the binding constraint.
Detailed answer & concept explanation~6 min readEverything 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. 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.
2 min: AI definition + roofline ridge point + LLM decode at AI near 1 + which optimizations raise AI versus cut bytes + diagnostic discipline.
Real products, models, and research that use this idea.
- The Berkeley roofline model (Williams et al.) is the canonical framework for reasoning about arithmetic intensity and is the basis for almost every inference-optimization deck.
- vLLM's continuous batching is an explicit AI-raising move: each request added to the batch reuses the same weight read, scaling AI linearly with batch.
- FlashAttention (Dao et al.) is the canonical example of a kernel that drops attention memory traffic by an order of magnitude, raising AI enough to make long-context attention practical.
- DeepSeek V4's Multi-head Latent Attention compresses KV cache bytes per token to raise effective decode AI on long contexts.
- NVIDIA Nsight and PyTorch Profiler both report achieved FLOPs and achieved bandwidth, letting engineers compute AI per kernel and locate it on the roofline.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does the ridge point shift when you move from BF16 to FP8 on the same GPU?
QWhy is prefill compute-bound while decode is bandwidth-bound on the same model?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Believing more FLOPs always means more throughput. When AI is near 1, the kernel is bandwidth-bound and adding compute does nothing. The fix is to raise AI, not to add tensor cores.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.