pub struct FusedRowSpec {
pub rows: usize,
pub cols: usize,
pub reduce: RowReduceKind,
pub x: Symbol,
pub y: Symbol,
pub weight: Option<Symbol>,
pub weight_rows: usize,
pub residual: Option<Symbol>,
pub bias: Option<Symbol>,
pub eps: Epsilon,
}Expand description
A recognized fused row op — a per-row reduction over a rows × cols tensor: one output row per input
row, each normalized independently over its cols entries. This is the transformer-normalization shape
(RMSNorm / softmax / LayerNorm over the hidden dim, batched across rows). The flat single-vector reduction
ReductionSpec is exactly the rows == 1 special case; this spec is what the one-block-per-row CUDA
emitter consumes, and it grows weight/residual as the fused variants land — the durable foundation.
Fields§
§rows: usize§cols: usize§reduce: RowReduceKind§x: Symbol§y: Symbol§weight: Option<Symbol>Per-column weight applied after the reduction (None for the weightless sugar).
weight_rows: usizeHow many rows of cols the weight holds: 1, one row shared by every row; L, the lanes of a hyper-connected
residual, row r taking the weight’s row r mod L (rmsnorm of H in L lanes with weight W).
residual: Option<Symbol>A fused residual added element-wise BEFORE the reduction — the reduced value is X[idx] + residual[idx]
(None for plain RMSNorm). This is the “add” of fused-add-RMSNorm (FIB 001_fused_add_rmsnorm).
bias: Option<Symbol>Per-column bias ADDED after the scale (Y = … * weight + bias) — the shift of LayerNorm (None for
RMSNorm, which has no bias).
eps: EpsilonThe norm’s epsilon, as the program gives it (Epsilon::DEFAULT for a softmax, which has none).
Trait Implementations§
Source§impl Clone for FusedRowSpec
impl Clone for FusedRowSpec
Source§fn clone(&self) -> FusedRowSpec
fn clone(&self) -> FusedRowSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FusedRowSpec
impl Debug for FusedRowSpec
Source§impl PartialEq for FusedRowSpec
impl PartialEq for FusedRowSpec
impl Eq for FusedRowSpec
impl StructuralPartialEq for FusedRowSpec
Auto Trait Implementations§
impl Freeze for FusedRowSpec
impl RefUnwindSafe for FusedRowSpec
impl Send for FusedRowSpec
impl Sync for FusedRowSpec
impl Unpin for FusedRowSpec
impl UnsafeUnpin for FusedRowSpec
impl UnwindSafe for FusedRowSpec
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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.