# Roofline

> Roofline: A chart of achievable operations per second against arithmetic intensity: a sloped roof set by memory bandwidth and a flat roof set by peak…

Canonical: https://llmdojo.dev/glossary/roofline

Also called roofline chart.

A chart of achievable operations per second against arithmetic intensity: a sloped roof set by memory bandwidth and a flat roof set by peak compute, meeting at the ridge.

Learn it in the lesson: [Measuring decode and prefill on a roofline](https://llmdojo.dev/learn/inference-optimization/where-the-time-goes/the-roofline) (Inference and Model Optimization · Where the Time Goes: Memory, Compute and Batching).

## Interview questions about Roofline

- [How would you show, on a given machine, that decode is bandwidth-bound and prefill compute-bound?](https://llmdojo.dev/interview/q/how-would-you-show-on-a-given-machine-that-decode-is-bandwidth)

## Related
- [Compute-bound](https://llmdojo.dev/glossary/compute-bound)
- [Memory bandwidth-bound](https://llmdojo.dev/glossary/bandwidth-bound)
- [Arithmetic intensity](https://llmdojo.dev/glossary/arithmetic-intensity)
- [Model bandwidth utilization (MBU)](https://llmdojo.dev/glossary/mbu)
- [Continuous batching](https://llmdojo.dev/glossary/continuous-batching)
- [Glossary of every term](https://llmdojo.dev/glossary)
