Skip to content
induwara.lk
Premium
induwara.lkGPU performance · Roofline

Roofline Model Calculator — Arithmetic Intensity & Ridge Point

Enter a GPU's peak compute and memory bandwidth (or pick a preset) plus your kernel's FLOPs and bytes moved. In one step it gives the arithmetic intensity, the ridge point, the attainable performance, and whether you are compute-bound or memory-bound — plotted on a log-log roofline chart.

By Induwara AshinsanaUpdated Jul 9, 2026
Roofline modelintensity · ridge · attainable
Williams et al. 2009

312 TFLOP/s · 2,039 GB/s · 80 GB. Peaks seed the fields below and stay editable.

Half-precision tensor-core peak (dense).

Machine's peak FLOP/s at the selected precision.

Machine's peak DRAM bandwidth.

Total floating-point operations the kernel performs.

Total bytes read from + written to DRAM.

Try a scenario
Arithmetic intensity
2,750FLOP/byte
I = work ÷ data moved
Ridge point
153.02FLOP/byte
I_ridge = π ÷ β
Attainable performance
312 TFLOP/s
P = min(π, β·I)
Fraction of peak
100%
P ÷ π (upper bound)
Compute-bound(I ≥ ridge)Raise tensor-core utilisation / occupancy — memory is not the limiter.

Roofline chart

101001,00010,0001e510 TF100 TF1 PFOperational intensity (FLOP/byte)Attainable performance (FLOP/s)

Roofline & ridge pointYour kernel — compute-bound

Single DRAM-bandwidth roof and one compute roof per precision, exactly as in Williams, Waterman & Patterson (2009). GPU peak compute and bandwidth are from NVIDIA datasheets (dense, no sparsity); specs last verified 2026-07-09. Full sources are listed below the calculator.

How it works

The Roofline model, introduced by Williams, Waterman and Patterson in 2009, bounds a kernel's achievable performance with just two machine numbers and two kernel numbers. The machine is described by its peak compute π (FLOP/s) and its peak DRAM bandwidth β (bytes/s). The kernel is described by its work W (total FLOPs) and the data it moves Q (total bytes to and from DRAM).

  1. Operational (arithmetic) intensity. I = W / Q, in FLOP/byte. It measures how much compute the kernel performs per byte it fetches.
  2. Ridge point. I_ridge = π / β. This is the intensity at which the machine stops being limited by memory and starts being limited by compute.
  3. Attainable performance. P = min(π, β·I). Left of the ridge the sloped bandwidth roof β·I binds; right of it the flat compute roof π binds.
  4. Classification. If I < I_ridge the kernel is memory-bound; if I ≥ I_ridge it is compute-bound. The boundary itself counts as compute-bound, since that is where the flat roof takes over.
  5. Percent of peak. P / π — the best fraction of peak FLOP/s the kernel can reach on this machine given only its intensity. It is an upper bound; real kernels sit at or below it because of occupancy, launch overhead, and imperfect overlap.

Everything is normalised internally to FLOP/s and bytes, then converted back for display, so you can mix units (TFLOP/s with GB/s, GFLOP with MB) without doing the conversions yourself. The same result is confirmed two independent ways: the single min(π, β·I) expression, and a piecewise branch that classifies the kernel first and then picks the roof — they agree to the FLOP because at the ridge β·I_ridge = π. The GPU presets carry each card's peak dense compute (per precision) and peak bandwidth straight from the NVIDIA datasheets cited below; they seed the fields but remain editable, so you can drop in your profiler's achieved bandwidth for a tighter bound.

Worked examples

Large FP16 GEMM on A100 → compute-bound

π = 312 TFLOP/s · β = 2039 GB/s · M=N=K=8192, fp16

  1. Work: W = 2·M·N·K = 2·8192³ = 1.0995×10¹² FLOP (≈ 1.10 TFLOP)
  2. Data: Q = (M·K + K·N + M·N)·2 = 3·8192²·2 = 4.0265×10⁸ B (≈ 0.40 GB)
  3. Intensity: I = 1.0995×10¹² / 4.0265×10⁸ = 2730.7 FLOP/byte
  4. Ridge: I_ridge = 312×10¹² / 2.039×10¹² = 153.0 FLOP/byte
  5. I (2730.7) ≥ ridge (153.0) → compute-bound
  6. Attainable: P = min(π, β·I) = π = 312 TFLOP/s = 100% of peak
  7. Read: big GEMMs are compute-bound — optimise tensor-core utilisation, not memory traffic.

Element-wise SAXPY on RTX 4090 → memory-bound

π = 82.6 TFLOP/s (FP32) · β = 1008 GB/s · N = 1×10⁹ fp32

  1. Work: W = 2·N = 2×10⁹ FLOP (one multiply + one add per element)
  2. Data: Q = 3·N·4 = 1.2×10¹⁰ B (read x, read y, write y)
  3. Intensity: I = 2×10⁹ / 1.2×10¹⁰ = 0.1667 FLOP/byte
  4. Ridge: I_ridge = 82.6×10¹² / 1.008×10¹² = 81.9 FLOP/byte
  5. I (0.1667) < ridge (81.9) → memory-bound
  6. Attainable: P = β·I = 1.008×10¹² × 0.1667 = 0.168 TFLOP/s ≈ 0.2% of peak
  7. Read: SAXPY is the textbook memory-bound kernel — fuse and cut data movement; the ALUs sit nearly idle.

Exactly at the ridge → boundary counts as compute-bound

π = 100 TFLOP/s · β = 1 TB/s → ridge = 100 FLOP/byte

  1. Kernel with I set exactly at the ridge: W = 100, Q = 1 → I = 100 FLOP/byte
  2. Ridge: I_ridge = 100×10¹² / 1×10¹² = 100 FLOP/byte
  3. I (100) ≥ ridge (100) → compute-bound (the boundary belongs to the flat roof)
  4. Attainable: P = min(100, 1×100) = 100 TFLOP/s = 100% of peak
  5. Off-by-one guard: a kernel sitting precisely on the ridge is classed compute-bound, never memory-bound.

Frequently asked questions

Sources & references

The Roofline formulas are implemented exactly as published in Williams et al. (2009). The GPU preset specs (peak dense compute per precision and peak DRAM bandwidth) were last cross-checked against the NVIDIA datasheets on 2026-07-09.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want another GPU preset added?

Email me at [email protected] — most fixes ship within 24 hours.