Site Tools


wiki:gflops

GFLOPS

GFLOPS is FLOPS measured in units of $10^9$ (gigaflops) floating-point operations per second. It's the natural scale for a single CPU core or a modest kernel running on one core: a modern x86 core doing double-precision arithmetic with AVX2 and FMA typically peaks somewhere in the tens of GFLOPS.

A back-of-envelope calculation

For a single core with 256-bit AVX2 (4 doubles per vector), fused multiply-add (2 FLOPs per lane per instruction), and two FMA ports, at 3 GHz:

$$\text{peak GFLOPS} = 3 \times 10^9 \text{ Hz} \times 4 \text{ lanes} \times 2 \text{ ops} \times 2 \text{ ports} = 48 \text{ GFLOPS}$$

This is peak, not achieved, per the distinction in FLOPS. A real kernel hits this ceiling only if every cycle issues two full-width FMA instructions with no stalls, which is realistic for a tight, well-vectorized loop like SAXPY (see SAXPY) operating on data that fits in cache, and unrealistic for anything memory-bound or branchy.

Why GFLOPS alone doesn't tell you much

A GFLOPS number in isolation says nothing about whether a workload is compute-bound or memory-bound, it's only useful compared against a specific machine's peak, or plotted against arithmetic intensity as the Roofline model does. Two kernels reporting the same GFLOPS can be in completely different situations: one might be running near peak on a slow, low-power core, and the other might be running at a small fraction of peak on a much faster core that's mostly waiting on memory.

wiki/gflops.md · Last modified: by 127.0.0.1