Arithmetic intensity is operations performed divided by bytes moved between memory and the processor, usually counted as FLOP per byte of DRAM traffic. For the product of two N × N FP16 matrices, read once and written once, the work is operations and the traffic is elements or bytes, giving N/3, about 340 for N = 1024. A matrix-vector product reuses each weight only once, giving about 1 FLOP/byte in FP16, and element-wise operations such as ReLU fall below 1. Intensity depends on the algorithm, the data type and how well the implementation reuses data.
The roofline model
The roofline model, which sometimes uses the term operational intensity, plots attainable performance against arithmetic intensity. Performance is the smaller of peak compute and memory bandwidth times intensity, so the chart has a slanted bandwidth ceiling and a flat compute ceiling. They meet at the ridge point, peak divided by bandwidth. With 100 TFLOPS and 2 TB/s the ridge is at 50 FLOP/byte, so a workload at 10 FLOP/byte is memory-bound at 2 TB/s × 10 = 20 TFLOPS. Below the ridge, extra arithmetic units do not help; above it, memory bandwidth is no longer the limit.
How to raise it
When a workload sits under the slanted roof, the fix is to do more work per byte or move fewer bytes. Blocking (tiling) keeps sub-matrices in caches or on-chip memory so each value fetched from DRAM is used many times. Operator fusion applies element-wise steps such as activations or normalization while data is still on chip, instead of writing it out and reading it back. Batching lets one read of the weights serve several inputs. Lower-precision data types cut the bytes per value, which raises operations per byte for the same computation.
Where you will meet it
Arithmetic intensity explains much of AI accelerator behavior. Large matrix multiplications are compute-bound and can approach peak throughput, while element-wise layers can take a noticeable share of runtime despite few operations. Inference at batch size 1 is a matrix-vector workload with intensity near 1, so it is limited by how fast weights stream from memory, which is why batching and weight quantization help. Compare it with the hardware's ridge point: the intensity belongs to the workload, the ridge point to the machine, and their ratio tells you which resource to optimize.
The roofline model plots performance against arithmetic intensity (operations per byte transferred to or from memory). Low-intensity workloads hit a slanted ceiling set by memory bandwidth; high-intensity workloads hit a flat ceiling at peak compute. With 1 TB/s of bandwidth and 100 TFLOPS of compute, for example, anything below 100 FLOP/byte is memory-bound. The model guides whether to improve data reuse or compute efficiency.
The operation count is 2N³, and memory traffic is 3N² elements for the three matrices, or 6N² bytes in FP16. Arithmetic intensity is, about 340 for N = 1024. The larger a matrix product, the more computation per byte, so it easily exploits arithmetic performance. By contrast, element-wise addition has intensity below 1 and is limited by memory bandwidth.
FAQ
How do you calculate arithmetic intensity?
Divide the number of operations (usually FLOPs) by the bytes transferred to and from memory. For an N × N FP16 matrix multiply this is.
What is the ridge point in a roofline model?
It is peak compute divided by memory bandwidth, the arithmetic intensity at which a workload switches from memory-bound to compute-bound. For 100 TFLOPS and 2 TB/s it is 50 FLOP/byte.
Why is batch-size-1 inference memory-bound?
Each weight is read from memory and used for just one multiply-add, so arithmetic intensity is about 1 FLOP/byte in FP16, far below the ridge point of typical accelerators.
Questions that mention Arithmetic intensity (5)
Arithmetic intensity appears in 7 practice questions across 3 topics, including AI Hardware & Software Stack, CPUs and architecture, Performance Analysis.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.