Module estimate

Module estimate 

Source
Expand description

2026-09-30: Roofline estimates on one device: the decode step at a batch, prefill of a prompt, and whether weights plus KV and recurrent state fit in the device’s usable memory.

Owner: metrale-circuit (hardware). Invariants:

  • Every node is costed by venn::roofline::node_cost (one cost model for Venn ranking and hardware plans); the decode step is summed in super::gaps, where a plan group that loops per row is costed per row, so a missing multi-row kernel shows in the step time.
  • Prefill of T tokens is the main section at T rows with a causal half-context (T/2).
  • Datasheet peaks are ceilings, not predictions: the report names the basis of every number.
  • Not counted: activations and workspaces, conv windows, the CUDA context, and launch overhead. The fit check says so beside its table.

Structs§

DeviceRoofline
2026-09-30: The roofline constants used on a device, and where they come from.
Footprint
2026-09-30: What one sequence and the whole model hold in device memory.

Functions§

activation_of
2026-09-30: Format of a node’s first input.
device_roofline
2026-09-30: The device’s constants: the measured ones when the registry points at them and they are measured (the class’s own manifest), else the datasheet with context_tokens taken from assumptions. A device without the FP4 MMA states its NVFP4 slot at the peak of fp4_fallback.
footprint
2026-09-30: The footprint of c under settings (kv_cache_dtype, ssm_h_dtype).
prefill_us
2026-09-30: The estimated prefill time of tokens tokens, microseconds, each node costed with roofline_of its index.
weight_floor_bytes
2026-09-30: Weight bytes a decode step reads at one row: every main-section weight once (routed experts at top_k of them). Divided by bandwidth, the C=1 floor.