Session 2 · A roofline you move by hand

Roofline Workbench

This page lets you move one inequality from Session 2, Section 6 by hand. Change the batch size and precision, and see for yourself which side of the roof the workload lands on and what percentage of the chip it uses.

Pattainable(I) = min( Ppeak , B × I ) · I* = Ppeak / B

Plotting a workload on the roof

Chip (BF16 dense)
Phase
Weight precision
Arithmetic intensity I
Ridge point I*
Attainable performance
Compute-unit utilization ceiling
Verdict

Upper bound on decode speed

A rough estimate that restates the same inequality in tokens. The answer is the smaller of the bandwidth-side and compute-side bounds. Chip, precision and batch size are taken from the settings above.

tokens/s ≲ min( N·B·η / (P·b) × Bsz , N·Ppeak / (2P) )
Model size P
Weight footprint
Minimum chips for capacity
Total bandwidth N·B·η
tok/s per sequence
Total tok/s
Binding bound

The chip-count slider sets how many chips to add beyond the capacity minimum. This calculation assumes the N chips split the weights and read them in parallel, so it adds bandwidth N times over; each extra chip raises the bandwidth-side bound in proportion (405B fp16 at batch 1: 11 chips 45 → 12 chips 50 tok/s). In practice, inter-chip communication keeps it from rising that much (see "What this chart does not say" below). At the minimum chip count, try 70B and 405B and check that, whatever the model size and precision, the batch-1 bound sits just above one chip's capacity ÷ bandwidth (about 42 tok/s for the H100). The η knob is there so you can enter the "60–80% bandwidth utilization" from the text.

Check against the solution tables ()
This compares the figure's calculations with the table and text of Session 2, Section 6 and the solutions to Exercises 1 and 2 (Exercise 2 uses H100 SXM, batch 1, η 100%). The "Solution" column holds the rounded values from the solution tables.
ItemComputedSolution

What this chart does not say

The roofline gives an upper bound that a long-running kernel cannot exceed. It is not a model that predicts actual speed. The limits listed in Session 2, Appendix B are repeated here.