pub enum TensorWasmOp {
VecAdd {
elem: ElemType,
lanes: u32,
},
VecMul {
elem: ElemType,
lanes: u32,
},
VecFma {
elem: ElemType,
lanes: u32,
},
MatMul {
m: u32,
n: u32,
k: u32,
},
LoadUnified {
elem: ElemType,
lanes: u32,
},
StoreUnified {
elem: ElemType,
lanes: u32,
},
Barrier,
}Expand description
One coarse-grained op in a TensorWasm-emitted GPU kernel.
Each op corresponds to a small group of PTX instructions; the emitter (S12) materialises them into a register-allocated assembly block.
Variants§
VecAdd
c = a + b element-wise.
VecMul
c = a * b element-wise.
VecFma
d = a*b + c element-wise (single rounding for floats).
MatMul
16x16x16 matrix multiply-accumulate (wmma on sm_80).
Fields
LoadUnified
Load lanes from unified-memory pointer + offset.
StoreUnified
Store lanes to unified-memory pointer + offset.
Barrier
CTA-wide synchronisation barrier.
Trait Implementations§
Source§impl Clone for TensorWasmOp
impl Clone for TensorWasmOp
Source§fn clone(&self) -> TensorWasmOp
fn clone(&self) -> TensorWasmOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TensorWasmOp
impl Debug for TensorWasmOp
Source§impl Display for TensorWasmOp
impl Display for TensorWasmOp
Source§impl PartialEq for TensorWasmOp
impl PartialEq for TensorWasmOp
Source§fn eq(&self, other: &TensorWasmOp) -> bool
fn eq(&self, other: &TensorWasmOp) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TensorWasmOp
Auto Trait Implementations§
impl Freeze for TensorWasmOp
impl RefUnwindSafe for TensorWasmOp
impl Send for TensorWasmOp
impl Sync for TensorWasmOp
impl Unpin for TensorWasmOp
impl UnsafeUnpin for TensorWasmOp
impl UnwindSafe for TensorWasmOp
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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>
Converts
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>
Converts
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