Module budget

Module budget 

Source
Expand description

2026-10-02: The memory budget of a device class and the queries over it: the driver’s share (kernels/<class>/HARDWARE.toml [memory], calibrated per class), the util budget, and the inverse questions “the most sequences at this length” and “the longest length at this many sequences”, answered by bisection over the one evaluator the forward report uses.

Owner: metrale-circuit (memory). Invariants:

  • Every driver term is read from the class’s [memory] table; a missing key is an error, never a default (#72’s runtime_headroom.rs constants are this table’s first source).
  • The inverse queries assume the footprint never shrinks as sequences or tokens grow, and they check the answer: the bound they return fits, the next value does not (or is the cap).

Structs§

DriverTerms
2026-10-02: What the driver holds beyond the allocation ledger, for one device class.

Enums§

BudgetError
2026-10-02: Why the class’s memory terms could not be read.

Functions§

largest_fitting
2026-10-02: The largest x in lo..=hi with fits(x), by bisection; None when lo does not fit. fits must be monotone (true up to some x, false after).
util_budget
2026-10-02: The util budget: device_bytes x util, as the engine computes it (truncated).