pub enum RowXformKind {
Rsqrt {
eps_nano: u64,
over: usize,
},
}Expand description
How a reduced per-row scalar becomes the multiplier the rescale broadcasts back across the row.
Variants§
Rsqrt
1/sqrt(s/over + eps).
★ THE DIVIDE LIVES HERE, ONCE, ON PURPOSE. It used to be folded into the reduction’s scaler
as 1/cols — but the reduce engine applies its scaler to EVERY TERM, so the chain computed
Σ(xᵢ²·k) where the specification computes (Σxᵢ²)/cols. Equal in exact arithmetic,
measurably different in floating point: each term picks up its own rounding. On the RDU’s
bf16 datapath the legalized rmsnorm drifted a full ulp from the VM and
spatial_front_end_lock caught it.
Widening the intermediates to fp32 changed the answer but did not fix it — which is the lesson. A decomposition’s numerics are not governed by intermediate PRECISION alone, but by which arithmetic is performed and where it narrows. Scale-once-at-the-end is part of the contract, so it is written into the op rather than left to a pass to remember.
Trait Implementations§
Source§impl Clone for RowXformKind
impl Clone for RowXformKind
Source§fn clone(&self) -> RowXformKind
fn clone(&self) -> RowXformKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RowXformKind
impl Debug for RowXformKind
Source§impl<'de> Deserialize<'de> for RowXformKind
impl<'de> Deserialize<'de> for RowXformKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for RowXformKind
impl Hash for RowXformKind
Source§impl PartialEq for RowXformKind
impl PartialEq for RowXformKind
Source§impl Serialize for RowXformKind
impl Serialize for RowXformKind
impl Copy for RowXformKind
impl Eq for RowXformKind
impl StructuralPartialEq for RowXformKind
Auto Trait Implementations§
impl Freeze for RowXformKind
impl RefUnwindSafe for RowXformKind
impl Send for RowXformKind
impl Sync for RowXformKind
impl Unpin for RowXformKind
impl UnsafeUnpin for RowXformKind
impl UnwindSafe for RowXformKind
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.