pub fn gemm_retired_floor(
m: usize,
n: usize,
k: usize,
tile: TileShape,
f: Fidelity,
) -> u64Expand description
★ THE FLOOR THE WHOLE MODEL IS ANCHORED ON: the fewest MVMULs a GEMM of this shape CAN retire at this fidelity — the tile-matmuls the mathematics demands, times the passes the fidelity costs.
It is a floor and not an identity, and the difference is the point. A program that retires MORE is doing arithmetic the problem does not require, and that is a real and measurable inefficiency rather than a different way of being right. Measured at 640^3: every program this compiler emits, and every tt-metal example, retires exactly this floor — 8,000 tile-matmuls. The vendor’s own default heuristic retires 8,820, because it rounds 20 tiles up to 21 in two of the three dimensions: 10.25% more arithmetic than the problem contains, at every fidelity.
Tile padding IS part of the floor: a 33-row operand occupies two tile rows and the machine pays for both. What is not part of it is padding a program adds on top of that.