#[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
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§
impl Copy for OpTag
impl Eq for OpTag
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> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.