pub enum BlueprintKind {
VectorAdd,
VectorMul,
VectorFma,
Matmul,
Conv2d,
Other,
}Expand description
Coarse classification of the blueprint shape, used by the tolerance
table to pick the right ULP/abs/rel triple. The proptest harness
generates inputs per kind; the auto-offload pipeline classifies
every emitted blueprint via BlueprintKind::classify.
Variants§
VectorAdd
Element-wise vector add (1 ULP for f32, 4 ULP for f16).
VectorMul
Element-wise vector multiply (1 ULP for f32, 4 ULP for f16).
VectorFma
Fused multiply-add (1 ULP, single-rounding contract on both
paths — CPU uses f32::mul_add, PTX uses fma.rn.f32).
Matmul
Reduction (matmul, dot product). Looser tolerance because reduction order is implementation-defined.
Conv2d
2D convolution. Tolerance bracketed with matmul because the inner loop is a multiply-accumulate over a sliding window.
Other
Anything else — defaults to strict 1-ULP behaviour.
Implementations§
Source§impl BlueprintKind
impl BlueprintKind
Sourcepub fn classify(bp: &TensorWasmKernelBlueprint) -> Self
pub fn classify(bp: &TensorWasmKernelBlueprint) -> Self
Classify a blueprint by its dominant op family. Order of
preference: matmul > conv2d > fma > add > mul > other. (The
PTX emitter does not yet emit a dedicated Conv2dOp — the
rewriter encodes 2D conv as a sequence of LoadUnified +
VecFma + StoreUnified, so we look for a VecFma block
preceded by a barrier as the conv signature.)
Trait Implementations§
Source§impl Clone for BlueprintKind
impl Clone for BlueprintKind
Source§fn clone(&self) -> BlueprintKind
fn clone(&self) -> BlueprintKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BlueprintKind
Source§impl Debug for BlueprintKind
impl Debug for BlueprintKind
impl Eq for BlueprintKind
Source§impl Hash for BlueprintKind
impl Hash for BlueprintKind
Source§impl PartialEq for BlueprintKind
impl PartialEq for BlueprintKind
Source§fn eq(&self, other: &BlueprintKind) -> bool
fn eq(&self, other: &BlueprintKind) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BlueprintKind
Auto Trait Implementations§
impl Freeze for BlueprintKind
impl RefUnwindSafe for BlueprintKind
impl Send for BlueprintKind
impl Sync for BlueprintKind
impl Unpin for BlueprintKind
impl UnsafeUnpin for BlueprintKind
impl UnwindSafe for BlueprintKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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