pub struct NumericsKnobs {
pub fidelity: Fidelity,
pub fp32_dest_acc: bool,
pub packer_l1_acc: bool,
pub pcc_floor: f64,
}Expand description
The three numerics knobs the measurement harness varies, and the PCC the program then requires of
itself. scripts/tt-matmul-measure.sh sets them as LOGOS_TT_FIDELITY / _FP32 / _L1ACC, and every
ledger row records what the program PRINTED rather than what was asked for — so this parser is part of
the measurement contract, not a convenience.
★ SALVAGED FROM THE RETIRED EMITTER, and narrowed on the way in. It used to carry its own math-fidelity
enum beside this crate’s Fidelity — two spellings of one concept, each with its own parse/as_str
— and a register-budget helper that halved the tile count under fp32 accumulate while taking a SECOND
chip descriptor to do it. SpatialTarget::effective_acc_tiles already expresses that exactly, so the
dependency on a duplicate description of the part dissolved rather than moved.
Fields§
§fidelity: Fidelity§fp32_dest_acc: boolAccumulate in fp32 in the register file: halves the tile budget, raises PCC.
packer_l1_acc: boolAccumulate K-block partials in local memory through the packer instead of reloading registers.
pcc_floor: f64The PCC the emitted program requires of itself before it prints LOGOS_MM_PASS.
Implementations§
Source§impl NumericsKnobs
impl NumericsKnobs
Sourcepub fn from_vars(
fidelity: Option<&str>,
fp32: Option<&str>,
l1acc: Option<&str>,
) -> Result<Self, String>
pub fn from_vars( fidelity: Option<&str>, fp32: Option<&str>, l1acc: Option<&str>, ) -> Result<Self, String>
The pure core of NumericsKnobs::from_env — every refusal is typed and names the variable, so a
mistyped knob stops the measurement instead of silently recording a different program.
Sourcepub fn policy(&self) -> NumericsPolicy
pub fn policy(&self) -> NumericsPolicy
The numerics policy these knobs express: fp32 accumulate is what keeps partial sums exact.
Trait Implementations§
Source§impl Clone for NumericsKnobs
impl Clone for NumericsKnobs
Source§fn clone(&self) -> NumericsKnobs
fn clone(&self) -> NumericsKnobs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NumericsKnobs
impl Debug for NumericsKnobs
Source§impl Default for NumericsKnobs
impl Default for NumericsKnobs
Source§fn default() -> Self
fn default() -> Self
★ ttnn’s OWN bf16 default numerics — HiFi2, bf16 dest-accumulate — so a head-to-head against the vendor is matched by construction rather than by remembering to pass a flag. Defaulting to HiFi4 would silently compare our four-pass arithmetic against the vendor’s two-pass and call the difference a compiler result.
Source§impl PartialEq for NumericsKnobs
impl PartialEq for NumericsKnobs
impl Copy for NumericsKnobs
impl StructuralPartialEq for NumericsKnobs
Auto Trait Implementations§
impl Freeze for NumericsKnobs
impl RefUnwindSafe for NumericsKnobs
impl Send for NumericsKnobs
impl Sync for NumericsKnobs
impl Unpin for NumericsKnobs
impl UnsafeUnpin for NumericsKnobs
impl UnwindSafe for NumericsKnobs
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.