pub struct ToleranceTable {
pub vector_add_f32: Tolerance,
pub vector_mul_f32: Tolerance,
pub vector_fma_f32: Tolerance,
pub matmul_f32: Tolerance,
pub conv2d_f32: Tolerance,
pub f16_ulp_multiplier: u32,
}Expand description
Per-blueprint floating-point tolerance for CPU↔GPU bit-identity checks.
fp32: 1 ULP allowed for element-wise ops; 2 ULP for reductions (matmul). fp16: 4 ULP allowed (smaller mantissa, larger drift). Integer: bit-identical required (tolerance == 0).
Fields§
§vector_add_f32: ToleranceVector add tolerance keyed by dtype.
vector_mul_f32: ToleranceVector mul tolerance.
vector_fma_f32: ToleranceFMA tolerance.
matmul_f32: ToleranceMatmul tolerance (looser — reduction order is impl-defined).
conv2d_f32: ToleranceConv2d tolerance (matmul-shaped budget).
f16_ulp_multiplier: u32f16 multiplier — every f32 budget is scaled by this for f16.
Implementations§
Source§impl ToleranceTable
impl ToleranceTable
Sourcepub const fn strict() -> Self
pub const fn strict() -> Self
Strict policy: zero tolerance everywhere. Used by the CI gate that asserts “the JIT produced identical bytes” — for ops the oracle pins as bit-identical (today: integer kernels only).
Sourcepub const fn default_table() -> Self
pub const fn default_table() -> Self
Default per-blueprint policy. Values mirror the table in
docs/DIFFERENTIAL-ORACLE.md#tolerance-table-v037.
Sourcepub fn for_blueprint(&self, kind: BlueprintKind, dtype: Dtype) -> Tolerance
pub fn for_blueprint(&self, kind: BlueprintKind, dtype: Dtype) -> Tolerance
Look up the tolerance for the given blueprint kind + dtype.
Integer kernels are always strict; f16 multiplies the f32 ULP
budget by Self::f16_ulp_multiplier.
Trait Implementations§
Source§impl Clone for ToleranceTable
impl Clone for ToleranceTable
Source§fn clone(&self) -> ToleranceTable
fn clone(&self) -> ToleranceTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToleranceTable
impl Debug for ToleranceTable
Auto Trait Implementations§
impl Freeze for ToleranceTable
impl RefUnwindSafe for ToleranceTable
impl Send for ToleranceTable
impl Sync for ToleranceTable
impl Unpin for ToleranceTable
impl UnsafeUnpin for ToleranceTable
impl UnwindSafe for ToleranceTable
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more