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.
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).
- Operational (arithmetic) intensity.
I = W / Q, in FLOP/byte. It measures how much compute the kernel performs per byte it fetches. - Ridge point.
I_ridge = π / β. This is the intensity at which the machine stops being limited by memory and starts being limited by compute. - Attainable performance.
P = min(π, β·I). Left of the ridge the sloped bandwidth roof β·I binds; right of it the flat compute roof π binds. - Classification. If
I < I_ridgethe kernel is memory-bound; ifI ≥ I_ridgeit is compute-bound. The boundary itself counts as compute-bound, since that is where the flat roof takes over. - 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
Frequently asked questions
Sources & references
- Williams, Waterman & Patterson (2009) — Roofline: An Insightful Visual Performance Model, Communications of the ACM 52(4)
- NVIDIA Nsight Compute Profiling Guide — Roofline / Speed-of-Light analysis
- NVIDIA A100 Tensor Core GPU — datasheet (peak compute & HBM2e bandwidth)
- NVIDIA H100 Tensor Core GPU — datasheet (peak compute & HBM3 bandwidth)
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
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.