Arithmetic intensity is operations per byte moved across a stated boundary. The boundary is part of the number: L1, LLC and DRAM intensities for one kernel differ.
A single-precision dot product over N elements does about 2N operations. It moves 8N bytes from DRAM, two vectors of 4N bytes, so its DRAM intensity is 2N / 8N = 0.25 FLOP per byte.
Attainable throughput is the lower of the two roofs. The memory roof is intensity times bandwidth, and the compute roof is flat at peak.
Performance is in FLOP per second. Intensity is in FLOP per byte, and bandwidth is in bytes per second, so the product has matching units.
The ridge point is where the two roofs meet. Its intensity is AI* = peak / bandwidth, the line between memory-bound and compute-bound.
Assumed platform (stated parameters, not measured hardware):
Peak P = 100 GFLOP/s, sustained DRAM BW = 20 GB/s
AI* = P / BW = 100 / 20 = 5 FLOP/B
AI = 0.5 -> min(100, 0.5 x 20 = 10) = 10 GFLOP/s, memory-bound
AI = 5 -> min(100, 5 x 20 = 100) = 100 GFLOP/s, at the ridge
AI = 20 -> min(100, 20 x 20 = 400) = 100 GFLOP/s, compute-boundAI (FLOP/B) | Memory roof (GFLOP/s) | Binding roof |
|---|---|---|
0.5 | 10 | Memory |
5 | 100 | Ridge, both |
20 | 100 (capped) | Compute |
Roofline says no faster than, never as fast as. Real kernels sit below the roof by a gap that latency, overlap and efficiency explain.
Ceilings must be sustained bandwidths measured or stated for the workload. Marketing peak numbers lift the slope and hide memory-bound kernels.
The ridge is at 100 / 20 = 5 FLOP per byte. AI 0.5 sits left of the ridge, so the kernel is memory-bound at 10 GFLOP/s.
The slope uses an unreachable ceiling. Sustained bandwidth lowers the slope, and some kernels fall back onto it as memory-bound.