Glossary Entry

Roofline Model

A performance model saying a workload's speed is capped by either a chip's peak compute or its memory bandwidth times the workload's arithmetic intensity, whichever is lower.

Hardware Optimization

Also called: roofline analysis, roofline plot

Seed source: Williams et al. 2009

The roofline model reduces performance analysis to one comparison: the time a computation takes is approximately the maximum of its FLOPs divided by the chip’s compute rate and its bytes moved divided by the chip’s memory bandwidth. Plotted against arithmetic intensity, achievable performance rises along a bandwidth-limited diagonal and then flattens at the compute peak, forming the “roofline” shape.

For LLMs it is the single most useful lens on both training and serving: large-batch matrix multiplications sit on the compute-bound roof, while one-token-at-a-time decoding sits far down the memory-bound slope. The same analysis applies at every level of the stack by swapping in the relevant bandwidth (HBM, chip-to-chip links, or datacenter network).