Skip to main content

Module roofs

Module roofs 

Source
Expand description

Roofs — the rates a chip sustains, each one cited: the roofline a program’s work is held against.

A SpatialTarget says what a chip HOLDS: sites, local memory, the accumulator. This says how fast it MOVES and COMPUTES: bytes per second off the chip, bytes per cycle across one network link, operations per cycle of a site’s matrix engine. A program’s work over a rate is a lower bound on its time; the largest of those bounds is the roof that binds it; and a measured or predicted time below the bound is a wrong byte count or a wrong roof, never a fast program (Williams, Waterman & Patterson, Roofline: an insightful visual performance model for multicore architectures, CACM 52(4), 2009).

Every rate is a Fact in the unit its source states it in. A vendor’s GB/s stays per second, a link’s width stays per cycle, and Roofs::per_cycle / Roofs::per_second convert through the clock with the weaker of the two provenances, so a published bandwidth never borrows a modeled clock’s authority. A rate the record does not give is absent rather than guessed: Roofs::mem and Roofs::compute answer None, and nothing downstream may price a resource without a roof.

An operation is the vendors’ unit: a multiply-add counts two.

Structs§

Bound
One resource’s lower bound on a program’s time.
ComputeRoof
A throughput: operations of one engine at one precision, over one scope. For an engine whose math fidelity is a number of passes over the operands, this is the rate of ONE pass: the work model already counts each pass as work (super::work::fidelity_passes), so a roof that divided by them again would charge the fidelity twice.
Converted
A rate converted to the unit asked for, with the provenance of the weaker of the rate and the clock.
LaneRate
A memory’s rate per cycle and what it counts.
MatrixRate
The rate a matrix engine sustains, and what one issue the work model counts is worth against it.
MemRoof
A bandwidth at one level of the hierarchy, for one access mix, over one scope, in the unit the transfer counts.
PerCycle
One resource’s rate per cycle, with what vouches for it.
Rates
The per-cycle rates a target’s roofs give for a program whose operands are one element type: what a roofline divides the work by. A resource without a roof has no rate.
Roofline
A program’s roofline on a target: one lower bound per resource the target has a roof for, the largest of which binds. A resource with no roof has no bound; nothing is priced at a guessed rate.
Roofs
A chip’s roofs.

Enums§

Engine
The engine an operation rate belongs to.
MemLevel
Where bytes move.
Rate
A rate in the unit its source states it in.
Resource
A resource a program’s work is bounded by.
Scope
What one rate is counted over.
StreamMix
The access mix a bandwidth holds for — the four STREAM kernels (McCalpin, Memory Bandwidth and Machine Balance in Current High Performance Computers, IEEE TCCA Newsletter, 1995) — or Any: a peak that bounds every mix, the way a bus’s data rate bounds whatever crosses it.
Transfer
What a memory rate counts. A bus moves bytes whatever they hold; an element-serial lane carries one element per cycle whatever its width, so its traffic is counted in elements.

Functions§

roofline
The roofline of w on t, for a program whose operands are elements.