Expand description
2026-10-02: The tensor-core policy of a kernel class (kernels/<class>/HARDWARE.toml
[tensor_core_policy]): which ops, at which modes, row counts and weight formats, a plan MUST
run on a tensor-core kernel, and the stated exemptions. audit checks one fused plan
against it from the compute units the class’s kernel families declare (venn::compute).
Owner: metrale-circuit (hardware). Invariants:
- Pure: the policy arrives as text, the plan and families as values.
- Nothing defaults: a requirement states its ops, modes, minimum rows and weight formats
(
["any"]is stated, not assumed); an exemption states its ops, modes, rows, the kernels it allows, its kind and its reason, and ameasuredexemption names its evidence. - A class’s policy is its own; it is not inherited along
HARDWARE.tomlinherits, since another class’s tensor cores and kernels differ. A class without one is reported as such. - A covered node whose group runs no tensor-core kernel is a violation unless an exemption lists the op, the mode, the row count and every kernel of the group. A covered node in a placeholder group (no kernel of the class covers the op) is a gap, listed, never a pass.
Structs§
- Exempt
- 2026-10-02: A stated exemption.
- Finding
- 2026-10-02: One covered node that runs off tensor cores.
- OpMatch
- 2026-10-02: An op a policy entry names: a base name (
linearis every role) orlinear:<role>. - Require
- 2026-10-02: Ops that must run on tensor cores at these modes, from
min_rowsrows. - TcAudit
- 2026-10-02: One plan’s audit.
- TcPolicy
- 2026-10-02: A class’s policy.
Enums§
- Exempt
Kind - 2026-10-02: Why an op may stay off tensor cores.
- Weights
- 2026-10-02: The weight formats an entry covers.
Functions§
- audit
- 2026-10-02: Audit
planofcagainstpolicy, with the unitsfamiliesdeclare. Covered nodes in groups emitted byskip_emitter(the hardware planner’s placeholders) are gaps, not violations. - describe
- 2026-10-02: One line per violation, for an error.
- enforce
- 2026-10-02: Audit
planned(and each runtime route’s arm) ofconr’s class:Nonewhen the class states no policy; an error (super::HwError::TensorCore) on a violation. - lint_
rules - 2026-10-02: Every rule-level violation of
policyinrules, one message each. - parse_
policy - 2026-10-02: The class’s policy from its parsed
HARDWARE.toml:Nonewhen it declares none. - unit_
of_ group - 2026-10-02: The unit a group’s kernels run on, from the families; an error names a kernel
no family declares.
Nonefor a group without kernels. - unit_
tag - 2026-10-02: A group’s unit as a plan line shows it (
ComputeUnit::tag):Nonefor a group without kernels,undeclaredwhen a kernel is in no family.