Arithmetic intensity

Also known as: operational intensity

On this page 7

Arithmetic intensity is the ratio of arithmetic operations to bytes of data moved between memory and the processor, usually expressed in FLOP per byte. In AI hardware, it tells engineers whether a kernel, a layer or a whole model will be limited by compute throughput or by memory bandwidth on a given GPU, TPU or other accelerator, and it is the horizontal axis of the roofline model.

The same quantity is often called operational intensity, particularly when the bytes are counted at the DRAM or high-bandwidth memory (HBM) level rather than at caches or registers. The metric belongs to the workload, not to the chip: a matrix multiplication has the same intensity on any hardware, but whether that intensity is high enough depends on the ratio of peak compute to memory bandwidth of the specific device.

How arithmetic intensity is calculated

Arithmetic intensity equals total floating-point operations divided by total bytes transferred. For a matrix multiplication of an M by K matrix with a K by N matrix, the work is about 2 x M x N x K operations (one multiply and one add per term), while the minimum traffic is reading both inputs and writing the output once.

Intensity depends strongly on numeric precision, because the same number of operations touches half as many bytes in bfloat16 as in FP32 and half again in FP8. It also depends on data reuse: tiling a computation so that values stay in on-chip SRAM or registers raises effective intensity without changing the arithmetic.

The approximate figures below show how common AI operations differ by orders of magnitude, assuming 16-bit values and counting only main-memory traffic.

OperationApproximate intensityUsually bound by
Element-wise activationBelow 1 FLOP per byteMemory bandwidth
Layer normalizationAbout 1 to 5 FLOP per byteMemory bandwidth
Matrix-vector productAbout 1 FLOP per byteMemory bandwidth
Large square matrix multiplyHundreds to thousands of FLOP per byteCompute
Convolution with many channelsTens to hundreds of FLOP per byteOften compute
Approximate arithmetic intensity of common AI operations

Arithmetic intensity in the roofline model

The roofline model plots attainable performance against arithmetic intensity. Attainable throughput is the minimum of peak compute and bandwidth multiplied by intensity, which produces a sloped line for memory-bound workloads and a flat ceiling for compute-bound workloads.

The point where the two lines meet is the ridge point or machine balance, equal to peak FLOP per second divided by memory bandwidth in bytes per second. A kernel whose intensity lies left of the ridge cannot reach peak compute regardless of optimization of its arithmetic; only reducing traffic or increasing reuse helps.

Typical machine balance values show why modern accelerators demand high intensity. The figures are rounded orders of magnitude for dense 16-bit math and vary by product and memory configuration.

Device classApproximate ridge pointImplication
Server CPUAbout 10 to 30 FLOP per byteModerate reuse is enough
Data-center GPU with HBMAbout 200 to 600 FLOP per byteLarge batched matrices needed
Edge NPU with LPDDR memoryOften above 100 FLOP per byteLow bandwidth limits large models
Wafer-scale or SRAM-heavy chipLower at the on-chip levelWeights stay close to compute
Typical machine balance by device class

Over successive hardware generations, peak compute has grown faster than memory bandwidth, so the ridge point moves to the right. This trend, often described as the memory wall, means that more and more workloads become memory-bound by default.

Why intensity shapes large language model inference

Transformer inference has two phases with very different intensity. The prefill phase processes the whole prompt at once and performs large matrix multiplications, so it is usually compute-bound. The decode phase generates one token at a time per sequence and must read all weights for very little arithmetic, so it is strongly memory-bound.

During decoding with batch size one, each weight is used for roughly two operations per token, giving an intensity of about 1 FLOP per byte for 16-bit weights. Batching many sequences multiplies the work done per weight read, which is why continuous batching and larger batches raise accelerator utilization, at the cost of higher latency and larger key-value cache memory.

TechniqueEffect on intensityTrade-off
Larger batch sizeRaises reuse of each weightMore latency and memory
Weight quantization to 8 or 4 bitsFewer bytes per operationPossible accuracy loss
Operator fusionAvoids writing intermediates to memoryMore complex kernels
Tiling for on-chip SRAMReuses data before evictionDepends on cache size
Speculative decodingVerifies several tokens per weight readExtra draft model compute
Techniques that change effective arithmetic intensity

Using arithmetic intensity in practice

Engineers use arithmetic intensity to predict the performance ceiling of a kernel before optimizing it. Profilers can report achieved FLOP and bytes per kernel, placing each kernel on the roofline and showing whether compute or memory is the right target.

For hardware selection, intensity explains why a chip with more peak TOPS can be slower on a given model. A device with higher memory bandwidth per FLOP may serve low-batch inference faster, while a device with more compute wins on training and large-batch work. Benchmarks such as MLPerf reflect this split by reporting separate training, offline and server scenarios.

Limitations and common misconceptions

Arithmetic intensity is a first-order model, not a complete performance prediction. It ignores latency, synchronization, interconnect traffic and imperfect overlap of computation with data movement.

  • Counting the wrong level of memory: intensity measured at the L2 cache differs from intensity measured at HBM, so the level must always be stated.
  • Assuming peak compute is reachable: tensor cores reach peak only with suitable shapes and precisions, so the practical ceiling is lower.
  • Ignoring communication: in multi-chip training, network bandwidth can form a lower roof than local memory.
  • Treating intensity as fixed: the same model has different intensity at different batch sizes, sequence lengths and precisions.

The short version

A chip does two jobs. It fetches numbers from memory, and it does math on them. Arithmetic intensity tells you how much math happens for each piece of data fetched.

Think of a chef and a pantry. If each ingredient is used in many dishes, the chef stays busy cooking. If each ingredient is used once, the chef spends most of the time walking to the pantry. Modern AI chips are very fast chefs with a slow pantry door. High intensity keeps the chip busy; low intensity leaves it waiting.

Where it makes a difference

An engineering team serves a 70-billion-parameter language model on data-center GPUs for a customer support chatbot. With one request per GPU at a time, profiling shows the decode kernels reaching only a small fraction of peak compute, because each token requires reading roughly 140 GB of 16-bit weights for very little arithmetic.

The team calculates arithmetic intensity for the decode step and confirms it is near 1 FLOP per byte, far left of the ridge point. They introduce continuous batching of about 32 concurrent requests and quantize weights to 8 bits. Effective intensity rises by well over an order of magnitude, and throughput per GPU increases several times while latency per token stays within the service target. The analysis also shows that buying a faster compute chip without more memory bandwidth would have brought little benefit.