What Is Arithmetic Intensity? Calculate GPU FLOPs per Byte and Understand Data Reuse
Arithmetic intensity is the number of floating-point operations performed for each byte that crosses a specified memory boundary. Its unit is FLOP/byte. To calculate it, first decide which operations to count and which boundary’s bytes to count. The ratio describes the relationship between work and data movement; it does not by itself tell you execution time or diagnose a bottleneck.
What Is Arithmetic Intensity? Calculate GPU FLOPs per Byte and Understand Data Reuse
Arithmetic intensity is the number of floating-point operations performed for each byte that crosses a specified memory boundary. Its unit is FLOP/byte. To calculate it, first decide which operations to count and which boundary’s bytes to count. The ratio describes the relationship between work and data movement; it does not by itself tell you execution time or diagnose a bottleneck.
What goes in the numerator
Count the floating-point work performed by the operation you want to compare. A FLOP is one floating-point operation. For example, an FP32 vector addition performs one addition per element, so it has one FLOP per element. In the usual Roofline convention, a fused multiply-add (FMA) counts as one multiplication plus one addition, or two FLOPs. NVIDIA’s description of matrix multiply-accumulate work uses the same convention. Record your counting rule in reports and comparisons. NVIDIA Nsight Compute Compute Triage Guide
The count is not the number of machine instructions. One instruction may process several elements at once, and one matrix instruction may perform many multiplications and additions. Index calculations and branches do not go in a floating-point FLOP numerator. This article uses the standard Roofline convention for comparing GPU floating-point work. If modeled FLOPs differ from hardware counters because of the instruction path or padding, compare the profiler’s operation counters with the source or SASS. NVIDIA Nsight Compute Compute Triage Guide
Which bytes go in the denominator
The denominator is not the size of the dataset. It is the number of bytes that cross the chosen memory boundary during the measured interval. You might count traffic at the DRAM boundary or at a boundary closer to L2. NVIDIA Nsight Compute’s hierarchical Roofline distinguishes L1, L2, and DRAM ceilings, so the same kernel can have different arithmetic intensity at different levels. Check the profiler’s boundary and byte definition instead of relying on the metric name alone. NVIDIA Nsight Compute Profiling Guide
A hierarchical Roofline can show several ceilings without recalculating a separate arithmetic intensity for each one. Check the selected section’s work and traffic metrics. NVIDIA notes that reuse can move the achieved point toward an L2 or L1 ceiling without changing arithmetic intensity. NVIDIA Nsight Compute Compute Triage Guide
Also separate an algorithmic estimate from a measurement on the GPU. An estimate makes assumptions about the sizes of inputs and outputs and reuse within a tile, then calculates logical traffic. Measured traffic may differ because of cache hits, repeated requests, memory transaction granularity, store behavior, and the kernel’s actual execution path. NVIDIA’s CUDA guide discusses reducing host-to-device transfers and global-memory accesses, and explains that effective bandwidth can vary substantially with access patterns. Do not infer DRAM traffic from the total size of the arrays alone. NVIDIA CUDA C++ Best Practices Guide
Calculate a simple operation and a tiled operation
The calculations below are illustrative assumptions for explaining FLOP/byte, not measurements from a particular GPU. Both examples use four bytes per FP32 value and omit extra traffic from address calculations, instructions, and alignment.
| Operation and assumptions | Work counted | Data movement counted | Arithmetic intensity |
|---|---|---|---|
| Elementwise vector addition: read A and B once each and write C once | 1 FLOP per element | 4 + 4 + 4 = 12 bytes per element | 1/12 ≈ 0.083 FLOP/byte |
| 32×32×32 matrix-multiplication tile: read A and B tiles once each and write the accumulated output tile once | 2×32×32×32 = 65,536 FLOPs | (32×32 + 32×32 + 32×32)×4 = 12,288 bytes | 65,536/12,288 ≈ 5.33 FLOP/byte |
The matrix-tile estimate assumes each value in A and B is reused across multiple output calculations and the accumulated result stays out of memory until the tile is complete. That makes the counted operations per byte higher than for the elementwise addition. If an implementation reloads inputs or stores intermediate results differently, its denominator changes. The example shows how reuse can change the ratio; it does not measure or prove that a matrix-multiplication kernel is faster on a particular GPU.
Check these assumptions before comparing values
Use this sequence to make a calculation reproducible:
**Fix the work interval.** State whether you mean the whole program or one kernel and record the input size and execution range.
**Record the operation-count rule.** Decide whether you count floating-point work only and state conventions such as counting an FMA as two FLOPs.
**Choose the memory boundary.** Name DRAM, L2, or another boundary. Do not mix traffic from unrelated levels in the denominator.
**Count reads and writes.** For an algorithmic estimate, state assumptions about input reuse, output writes, and temporary data.
**Divide compatible counts.** `Arithmetic intensity = FLOP count ÷ bytes at the selected boundary`. If a source-level estimate differs from a profiler value, compare the boundary, counter range, cache behavior, and executed instruction path.
What arithmetic intensity can and cannot tell you
A higher ratio means fewer bytes crossed the stated boundary relative to the stated work. Reuse or tiling can produce that result. The ratio alone does not reveal the kernel’s execution time, whether bandwidth is saturated, or how fully the compute units are used. To diagnose a bottleneck, combine execution time with profiler metrics from the same work interval. Reading Roofline ceilings and achieved points is a separate performance-diagnosis task.
Sources
[Williams, Waterman, and Patterson, original Roofline paper (UC Berkeley)](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2008/Archive/EECS-2008-134.pdf)
[NVIDIA Nsight Compute Profiling Guide: Roofline Charts](https://docs.nvidia.com/nsight-compute/ProfilingGuide/)
[NVIDIA Nsight Compute Compute Triage Guide](https://docs.nvidia.com/nsight-compute/ComputeTriage/)
[NVIDIA CUDA C++ Best Practices Guide](https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/)