pub struct PatternOp {
pub op: OpKind,
pub roles: BTreeSet<LinearRole>,
pub layer_kind: Option<LayerKind>,
pub local: Option<String>,
pub weight: Option<Format>,
pub input: Option<Format>,
pub writes: Option<Format>,
pub keep: bool,
pub stored: bool,
pub sibling: bool,
pub holds: Option<Format>,
pub steps: BTreeMap<StepKind, Value>,
}Expand description
2026-09-28: One element of a rule’s op chain.
Fields§
§op: OpKind2026-09-28: The op the node must be. For linear with a roles list, any of
PatternOp::roles matches and this holds the first.
roles: BTreeSet<LinearRole>2026-09-28: Linear roles any of which matches; empty means op exactly.
layer_kind: Option<LayerKind>2026-09-28: The node’s layer must be of this kind, when set.
local: Option<String>2026-09-28: The node’s template-local id must be this, when set.
weight: Option<Format>2026-09-28: The node’s weight format must be this, when set.
input: Option<Format>2026-09-28: The format the kernel reads its first input as. Checked after fusion against the format the producing group writes, so a rule set whose kernels disagree on a materialised edge is refused.
writes: Option<Format>2026-09-28: The format the kernel stores this element’s outputs in, when it is not the circuit’s declared format (the verify conv stores BF16 where decode keeps F32).
keep: bool2026-09-28: The kernel writes this element’s outputs even though a later element reads them, so they may have readers outside the group.
stored: bool2026-09-30: The kernel stores this element’s outputs in memory, where a later launch of the group reads them back (a per-run schedule’s conv rows), so they are materialized even when every reader is in the group.
sibling: bool2026-09-28: The element joins the group by sitting in the same block as the first element rather than by reading an output of an earlier one (a shared expert beside the routed experts).
holds: Option<Format>2026-10-02: The format the kernel hands this element’s outputs to later members of the
group in, where it is not the format the plan stores (a sum kept in FP32 registers);
None hands them on as stored (crate::pipeline::require).
steps: BTreeMap<StepKind, Value>2026-10-02: Steps of this element’s node that the routing runs at another value than the reference requirement (an activation quantized inside the group, a sum rounded to BF16), stated so the plan shows them and the kernel must declare them.
Trait Implementations§
impl Eq for PatternOp
impl StructuralPartialEq for PatternOp
Auto Trait Implementations§
impl Freeze for PatternOp
impl RefUnwindSafe for PatternOp
impl Send for PatternOp
impl Sync for PatternOp
impl Unpin for PatternOp
impl UnwindSafe for PatternOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.