Home Knowledge Base The Roofline Model

The Roofline Model is the visual performance analysis framework that plots achievable computation throughput (FLOPS) against arithmetic intensity (FLOPS/byte) — creating a "roofline" ceiling defined by peak compute capacity (horizontal) and peak memory bandwidth (diagonal slope) that immediately reveals whether a kernel is compute-bound or memory-bound and quantifies the gap between achieved and theoretically achievable performance.

The Model

For a given hardware platform:

The roofline ceiling for a kernel with arithmetic intensity AI is: Achievable FLOPS = min(P, B × AI).

Reading the Roofline Plot

Performance  |        _______________  (Peak Compute)
(GFLOPS)     |       /
             |      /  (Bandwidth Ceiling)
             |     /
             |    / * Kernel A (memory-bound, 70% of roof)
             |   /
             |  /         * Kernel B (compute-bound, 45% of roof)
             | /
             |/______________________________
                    Arithmetic Intensity (FLOP/Byte)

Kernel A is memory-bound at 70% of the bandwidth roof — optimizing should focus on data reuse (tiling, caching) to increase AI or reducing unnecessary loads. Kernel B is compute-bound at 45% of the compute roof — optimizing should focus on vectorization, ILP, and instruction mix.

Extended Roofline

The basic model can be extended with additional ceilings:

Practical Application

The Roofline Model is the performance engineer's X-ray machine — instantly diagnosing whether a kernel is starved for data or saturated with computation, and quantifying exactly how much performance headroom remains before hitting the hardware's fundamental limits.

roofline model performancearithmetic intensitycompute bound memory boundroofline analysisperformance ceiling

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.