Skip to main content

Module roofline

Module roofline 

Source
Expand description

Simple roofline estimates per kernel (plan §6 / §10).

For each kernel we estimate the FLOPs performed and the bytes moved over a representative problem size, giving an arithmetic intensity (FLOP/byte) and a memory-vs-compute classification.

Known limitations (honest, not stubs). This is an estimate only; it never rejects a schedule. wgpu does not expose device peak FLOPS or memory bandwidth, so there is no device-relative roofline ceiling to reject against — a real device-relative bound would require a calibration micro-benchmark. Likewise, compute-unit-saturation pruning is not implemented because wgpu does not expose a compute-unit (SM/CU) count. The classification here is therefore used to explain why a schedule is (or isn’t) worth pursuing and to drive the search-tree dump, not to gate the search.

Structs§

RooflineEstimate

Enums§

RooflineBound
Whether a kernel is dominated by memory traffic or by arithmetic.

Constants§

DEFAULT_BALANCE_FLOP_PER_BYTE
Crossover FLOP/byte below which a kernel is treated as memory-bound. Modern discrete GPUs sit roughly in the 10–40 range; 10 is a conservative default used when no per-device calibration is available.

Functions§

roofline_for
Roofline estimate for kernel over a representative size n (output elements / records / rays, depending on the kernel).