Skip to main content

OpTag

Enum OpTag 

Source
#[non_exhaustive]
pub enum OpTag {
Show 80 variants Add, Sub, Mul, Div, Maximum, Minimum, Pow, Rem, Neg, Abs, Sqr, Sqrt, Rsqrt, Recip, Exp, Log, Sin, Cos, Tanh, Sigmoid, Silu, GeluTanh, Gelu, Relu, Erf, Step, Floor, Ceil, Round, Sign, AddScalar, MulScalar, PowI, Clamp, Equal, Ne, Lt, Le, Gt, Ge, Where, MaskedFill, SumAll, MaxAll, MinAll, MeanAll, SumDim, MaxDim, MeanDim, ReduceSumTo, ReduceMaxTo, CumSum, MatMul, Transpose, Permute, Reshape, BroadcastTo, Unsqueeze, Squeeze, Cast, Slice, Concat, Flip, Roll, Pad, Triu, Tril, IndexSelect, Gather, IndexAdd, ScatterAdd, LogSoftmaxLastDim, Iota, Const, RuntimeScalar, ReducedCount, ScanPlaceholder, Scan, View, Fused,
}
Expand description

The §4.1 graph-Op vocabulary, functional ops only — the stable op identifier a PatternNode carries. Excludes in-place variants (a region is the functional subgraph; in-place is a Fuel-side scheduling rewrite) and structural / bookkeeping ops (Const, Release, Alloc, views, …). The Op -> OpTag projection (op_to_tag) lives Fuel-side (it needs the graph Op); the inverse — which params an emitted op carries — rides OpAttrs + the extract: path.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Add

§

Sub

§

Mul

§

Div

§

Maximum

§

Minimum

§

Pow

§

Rem

§

Neg

§

Abs

§

Sqr

§

Sqrt

§

Rsqrt

§

Recip

§

Exp

§

Log

§

Sin

§

Cos

§

Tanh

§

Sigmoid

§

Silu

§

GeluTanh

§

Gelu

§

Relu

§

Erf

§

Step

§

Floor

§

Ceil

§

Round

§

Sign

§

AddScalar

§

MulScalar

§

PowI

§

Clamp

§

Equal

§

Ne

§

Lt

§

Le

§

Gt

§

Ge

§

Where

§

MaskedFill

§

SumAll

§

MaxAll

§

MinAll

§

MeanAll

§

SumDim

§

MaxDim

§

MeanDim

§

ReduceSumTo

§

ReduceMaxTo

§

CumSum

§

MatMul

§

Transpose

§

Permute

§

Reshape

§

BroadcastTo

§

Unsqueeze

§

Squeeze

§

Cast

§

Slice

§

Concat

§

Flip

§

Roll

§

Pad

§

Triu

§

Tril

§

IndexSelect

§

Gather

§

IndexAdd

§

ScatterAdd

§

LogSoftmaxLastDim

§

Iota

§

Const

Scalar literal leaf: a dtype-agnostic bit pattern (const_bits). NOT Fuel’s Op::Const (a whole constant TENSOR / weight leaf) — this is the KISS const source op, a baked scalar value. Distinct from OpTag::RuntimeScalar: a baked value and an unfilled dispatch slot are not interchangeable.

§

RuntimeScalar

Dispatch-bound scalar leaf: the slot_index of an unfilled scalar slot (Fuel-side: the pre-order position in FusedOpParams::Runtime { scalars }, counted by runtime_fused::count_scalar_slots).

§

ReducedCount

The value-side product of extents over the reduced axes — the Mean divisor, so mean == div(reduce[sum,..](x), reduced_count(axis)) is one flat DAG (canonical KISS §6.12-0001; the retired name was reduce_extent). Single-axis, riding the same axis carrier as the fold; it grows to a reduce_axes list ONLY in lockstep with the fold.

§

ScanPlaceholder

A body hole of Op::Scan: role (0 = carry, 1 = elem — see SCAN_ROLE_CARRY/SCAN_ROLE_ELEM) + index (which xs[i] an elem hole stands for; a carry hole is index 0 in the v1 single-carry model).

§

Scan

Fuel’s bounded lax.scan recurrence primitive (fuel_graph::Op::Scan). A structural token — like OpTag::ScanPlaceholder, NOT a KISS base op: its params (n_xs/bound/emit/early_exit) ride the Fuel-internal OpAttrs scan_* fields and are NOT serialized to the §6.19 cross-producer wire (the empty-body _ arm in OpAttrs::to_canonical_bytes), exactly like the shape-relative recipe-interior fields. The body sub-graph rides the node’s trailing operands (Phase-1 lax.scan input encoding: [init_carry, xs.., consts.., body_new_carry, body_y, [pred_exit]]). Re-emitted by runtime_fused::tag_to_op; no op_to_tag producer (a scan node is a base-map terminal the matcher never recognizes).

§

View

Multi-output slot projection (fuel_graph::Op::View) — the bundle carrier a scan (or any multi-output producer) exposes its per-slot outputs through. A structural token: the slot rides the Fuel-internal view_slot OpAttrs field, not the §6.19 wire. On re-emit the slot’s shape/dtype come from the producer’s output_views bundle (the emitter sets that bundle when it re-emits the producing Scan), mirroring fuel_graph::Graph::view.

§

Fused

A nested fused op carried inside a recipe AS-IS (fuel_graph::Op::Fused(id, params)) — the attention-trio decompose’s inner softmax (flash_attn/paged_attn emit an Op::Fused(SOFTMAX_LAST_DIM, ..) node; flash_attn_backward an Op::Fused(SOFTMAX_LAST_DIM_BACKWARD, ..)). A structural token — like OpTag::Scan/OpTag::View, NOT a KISS base op: it names which registry entry the node reconstructs to (via the OpAttrs::fused_op selector) and is Fuel-internal, NOT serialized to the §6.19 cross-producer wire (a Fused node hits the empty-body _ arm of OpAttrs::to_canonical_bytes, exactly like the scan_*/view_slot fields). Re-emitted by runtime_fused::tag_to_op for the param-less nested fused ops (a small fid → params map); any param-carrying id is an honest miss. No op_to_tag producer — the base map lowers past a nested fused node (it recursively decomposes past itself), so the recipe just re-carries it, keeping the softmax fused so the optimizer can re-cover it. On re-emit its shape/dtype come from the named registry entry’s shape_rule/dtype_rule (primitive_shape honest-misses Fused).

Trait Implementations§

Source§

impl Clone for OpTag

Source§

fn clone(&self) -> OpTag

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for OpTag

Source§

impl Debug for OpTag

Source§

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

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

impl Eq for OpTag

Source§

impl Hash for OpTag

Source§

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

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 PartialEq for OpTag

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OpTag

Auto Trait Implementations§

§

impl Freeze for OpTag

§

impl RefUnwindSafe for OpTag

§

impl Send for OpTag

§

impl Sync for OpTag

§

impl Unpin for OpTag

§

impl UnsafeUnpin for OpTag

§

impl UnwindSafe for OpTag

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
Source§

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

Source§

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

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

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

Source§

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V