Expand description
Operation types — every tensor op in the RLX IR.
Designed for pattern-matching fusion: ops are grouped by category so fusion passes can reason about them structurally.
Enums§
- Activation
- Unary element-wise activation functions.
- Attention
BwdWrt - Which forward input an
Op::AttentionBackwardnode differentiates. - Binary
Op - Binary element-wise operations.
- Chain
Operand - An operand inside a fused
ChainStep— either a graph-level input to theOp::ElementwiseRegion(by index 0..num_inputs) or the result of a previous step in the chain (by index 0..step_position). - Chain
Step - One step in a fused element-wise chain. Each step produces exactly
one scalar result (per element); later steps can refer to it via
ChainOperand::Step. The whole chain runs per element in registers. - CmpOp
- Comparison operations (return Bool tensor).
- Mask
Kind - What kind of attention mask the kernel should apply.
- Op
- An operation in the RLX IR graph.
- OpKind
- PLAN L4: discriminant for each
Opvariant. Used byOp::kind+ theBackend::supported_opstrait method to declare which ops a backend can lower; theLegalizeForBackendpass inrlx-optchecks the graph against this set and fails the compile when an unsupported op is present (instead of silent fallback). - Reduce
Op - Reduction operations along specified axes.
- Scale
Mode - Scale-tracking strategy for
Op::FakeQuantize. Determines how the per-channels[c]is computed each forward pass. - SteKind
- Straight-through estimator variants for
Op::FakeQuantize’s backward. The forward is the same regardless: discreteclamp(round(x/s)) * s. The choice here affects only the gradient w.r.t.xduring training.