silicon atlasTHE HARDWARE REFERENCE
العربية
Reference/The whole system
Systems & I/O

The roofline model

Relate useful operations to the bytes needed to feed them.

A faster compute engine cannot help much if it spends its time waiting for bytes.
Work

Useful counted operations.

LIVE EXPERIMENT

Find the bottleneck

Runs on your device
05001,0001,5002,0000.25141632GFLOP/sIntensity (FLOP / byte)
Ideal upper bound400 GFLOP/s
Limiting resourceMemory
Ridge point10 FLOP/B

Low arithmetic intensity hits the memory ceiling. More data reuse can move the workload toward the compute ceiling.

What this model includes

An ideal upper bound with fixed peak compute and bandwidth. Ignores latency, overhead, cache-level traffic, and instruction mix.

FOLLOW THE MECHANISM

What happens inside

1

Compute arithmetic intensity

Arithmetic intensity is useful operations divided by bytes moved at a specified memory level. The roofline bounds throughput by the lesser of peak compute and bandwidth times intensity. Define the operation format and memory boundary explicitly; DRAM intensity and L1 intensity are different quantities.

2

Move toward the useful ceiling

Tiling, fusion, and reuse can raise intensity by reducing traffic. Vectorization and suitable kernels can improve utilization of the compute ceiling. Real performance falls below the bound because of latency, instruction mix, synchronization, and imperfect access. The model helps classify a bottleneck, not predict an exact runtime.

THE RELATIONSHIPthroughput ≤ min(peak_compute, bandwidth × intensity)
PUT IT TO WORK

What this means for your code

Low-level engineer

Measure traffic and achieved operation rate. Use separate roofs for precisions and memory levels when the workload requires it.

Software developer

Eliminate redundant copies and intermediate materialization. Reusing data can help more than buying a device with a higher peak arithmetic number.

GO TO THE SOURCE

Read the actual specifications

These references supply the underlying contracts and implementation details. The diagrams here are simplified teaching models.

UC Berkeley · Roofline modelUniversity of California, Berkeley

Keep following the connection

Understood the idea? Keep a note of your progress.