Module rules

Module rules 

Source
Expand description

2026-09-28: Fusion rules: kernels/<hw>/common/FUSIONS.toml. Each rule names an op chain, the kernel that runs it, where it applies (rows, modes, caps, policy settings) and how its numerics relate to the reference.

Owner: metrale-circuit. Invariants:

  • A bit_identical rule names its microtest, and a differs rule its opt-in lever; a rule missing either is a load error, as is a lever or microtest on a reference rule.
  • Rule ids are unique; rows is a non-empty inclusive range; modes is non-empty.
  • Every rule cites the dispatch site that makes today’s choice (cite).

Structs§

KernelId
2026-09-28: A kernel entry point as the engine looks it up: the module name (the source stem after KERNEL.toml [modules] renames, e.g. norm for rms_norm.cu) and the function.
PatternOp
2026-09-28: One element of a rule’s op chain.
Rule
2026-09-28: One fusion rule.

Enums§

Mode
2026-09-28: Which forward a plan is for.
Numerics
2026-09-28: How a rule’s output relates to the reference numerics.
Repeat
2026-09-28: How many times a group’s kernels launch per step.
RuleError
2026-09-28: Why FUSIONS.toml did not load.

Functions§

parse_rules
2026-09-28: Parse FUSIONS.toml text into rules, in file order. 2026-09-30: A file that declares [[runtime]] routes is refused: a caller that plans reads it with crate::runtime::parse_rule_set, so no route is dropped unseen.