Module declare

Module declare 

Source
Expand description

2026-10-02: The DECLARED side: the pipeline each kernel family implements, as KERNEL_FAMILIES.toml states it (pipeline.<op>, per point [[family.point]] pipeline.<op>, per kernel kernel_pipeline."<kernel>".<op>), and its resolution for one node of one plan group.

An op key is an op base name (linear, rms_norm) or a linear role (linear:shared_down) where one family’s roles differ, optionally narrowed to where the node’s first input comes from an op (linear after act_quant) or its first output feeds one (silu_mul feeds act_quant), as [[family.op]] after / feeds narrow matching: one kernel can hand the same product on differently depending on what follows it. Each entry states in, every step of the op’s vocabulary (super::vocab) and out, or is the word "uninstantiated": an op the family lists as a parameterization target (a policy no point instantiates), which no node may resolve to. A value may name a compile-time or policy parameter of the family as {param}, filled from the node’s point (a KV dtype, a quantizer’s format).

Owner: metrale-circuit (pipeline). Invariants:

  • Every op a family implements has a family-level pipeline (for a linear with roles: each role, by the role’s key or the base linear key); points and kernels only override.
  • Every entry parses under every point it can apply to, at load; resolution cannot meet a value it has not seen parse.
  • The most specific declaration wins: a kernel’s, then the node’s point’s, then the family’s. Two kernels of one group that declare different pipelines for a node are an error.

Structs§

FamilyPipelines
2026-10-02: A family’s family-level and kernel-level declarations (point-level ones live on the points, venn::families::Point::pipeline).
RawPipeline
2026-10-02: One declared pipeline as written: values may hold {param} placeholders.
Site
2026-10-02: Where a node sits: its op, the op producing its first input and the op of the first node reading its first output (what a narrowed key matches).

Enums§

Entry
2026-10-02: One declaration of one op.

Functions§

declared_for
2026-10-02: The pipeline a family declares for the node at site, run by group (the plan group’s kernels), at the node’s point point (the values it carries) among points (each point’s values and own declarations).
parse_by_op
2026-10-02: Parse one pipeline table (op key to { in, <steps>, out } or "uninstantiated").
resolve
2026-10-02: p at the point values.
validate
2026-10-02: Check a family’s declarations against the ops it implements, its kernels and its points (points: each point’s values and own declarations).

Type Aliases§

ByOp
2026-10-02: Op key to declaration.