OpKind

Enum OpKind 

Source
pub enum OpKind {
Show 31 variants Embed, RmsNorm, GatedRmsNorm, ResidualAdd, Copy, Concat, Split, Linear(LinearRole), SiluMul, Relu2, ActQuant(Format), QkNorm, Rope, KvWrite, PagedAttention, SigmoidGateMul, GdnGates, Conv1dUpdate, L2Norm, GdnRecurrence, SsmUpdate, Router, TopK, ExpertGateUp, ExpertDown, Blend, EpReduce, FinalNorm, LmHead, Argmax, StateSnapshot,
}
Expand description

2026-09-28: The closed op vocabulary.

Variants§

§

Embed

2026-09-28: Token embedding lookup; a source node.

§

RmsNorm

2026-09-28: RMSNorm with a learned weight.

§

GatedRmsNorm

2026-09-28: RMSNorm of one input gated by SiLU of another (GDN output norm).

§

ResidualAdd

2026-09-28: Elementwise sum of two streams.

§

Copy

2026-09-28: A copy between buffers.

§

Concat

2026-09-28: Concatenate inputs along the feature dim.

§

Split

2026-09-28: Split or deinterleave a packed projection output.

§

Linear(LinearRole)

2026-09-28: A weight-bearing projection.

§

SiluMul

2026-09-28: silu(gate) * up over a packed gate|up input.

§

Relu2

2026-09-29: relu(x)^2 of an ungated up projection.

§

ActQuant(Format)

2026-09-28: Quantize activations to the given format.

§

QkNorm

2026-09-28: Per-head RMSNorm of Q or K.

§

Rope

2026-09-28: Rotary position embedding.

§

KvWrite

2026-09-28: Append K and V to the paged cache.

§

PagedAttention

2026-09-28: Paged softmax attention over the cache.

§

SigmoidGateMul

2026-09-28: x * sigmoid(gate) (attention output gate).

§

GdnGates

2026-09-28: GDN beta and decay from the ba projection.

§

Conv1dUpdate

2026-09-28: Causal depthwise conv1d step with its rolling state.

§

L2Norm

2026-09-28: L2 normalisation of Q and K heads.

§

GdnRecurrence

2026-09-28: The gated delta rule recurrence over the recurrent state.

§

SsmUpdate

2026-09-29: The Mamba2 selective state-space update: one step of the SSM state per row (dt softplus, A, the grouped B/C projections and the D skip).

§

Router

2026-09-28: MoE router logits.

§

TopK

2026-09-28: Top-k expert selection and weights.

§

ExpertGateUp

2026-09-28: Routed experts’ gate and up projections.

§

ExpertDown

2026-09-28: Routed experts’ down projections.

§

Blend

2026-09-28: Weighted sum of the routed experts and the gated shared expert.

§

EpReduce

2026-09-28: Cross-rank reduction of an expert-parallel FFN output.

§

FinalNorm

2026-09-28: The model’s final RMSNorm.

§

LmHead

2026-09-28: Vocabulary projection.

§

Argmax

2026-09-28: Greedy token selection over the logits.

§

StateSnapshot

2026-09-29: A snapshot of the recurrent state its input’s producer updates, taken after each row but the last into the step’s checkpoint slots (the verify’s rollback points). It has no output.

Implementations§

Source§

impl OpKind

Source

pub fn parse( name: &str, role: Option<&str>, format: Option<Format>, ) -> Result<Self, OpParseError>

2026-09-28: Resolve an op name. linear needs role, act_quant needs format; every other op refuses both.

Source

pub fn base_name(&self) -> &'static str

2026-09-28: The op’s base name (linear, act_quant, rms_norm, …).

Source

pub fn name(&self) -> String

2026-09-28: The canonical spelling with its qualifier, e.g. linear:down, act_quant:fp8/token.

Source

pub fn is_heavy(&self) -> bool

2026-09-28: An op that is never generated: projections, attention, the recurrence, the experts and the vocabulary projection. Fusion happens at its edges.

Source

pub fn reads_linear_weight(&self) -> bool

2026-09-28: Ops that read a weight whose format the precision resolver answers.

Trait Implementations§

Source§

impl Clone for OpKind

Source§

fn clone(&self) -> OpKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OpKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for OpKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for OpKind

Source§

fn cmp(&self, other: &OpKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for OpKind

Source§

fn eq(&self, other: &OpKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for OpKind

Source§

fn partial_cmp(&self, other: &OpKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for OpKind

Source§

impl Eq for OpKind

Source§

impl StructuralPartialEq for OpKind

Auto Trait Implementations§

§

impl Freeze for OpKind

§

impl RefUnwindSafe for OpKind

§

impl Send for OpKind

§

impl Sync for OpKind

§

impl Unpin for OpKind

§

impl UnwindSafe for OpKind

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.