pub enum MmaKind {
Dp4aI8,
WmmaI8,
HmmaBf16,
HmmaF16,
}Expand description
The tensor-core (or CUDA-core) MMA family a GEMM lowers to, keyed on operand PRECISION. Int8 (Dp4aI8
CUDA-core, WmmaI8 IMMA) already exist; HmmaBf16/HmmaF16 add the half-precision tensor-core path.
(FP8/NVFP4 join later via the mma.sync/tcgen05 PTX path on Hopper/Blackwell.)
Variants§
Dp4aI8
__dp4a on the CUDA cores — the universal int8 fallback (any shape, sm_61+).
WmmaI8
IMMA int8 tensor cores, 16×16×16 s8→s32 (sm_75+, 16-aligned).
HmmaBf16
HMMA bf16 tensor cores, 16×16×16 bf16→f32 (sm_80+, 16-aligned).
HmmaF16
HMMA fp16 tensor cores, 16×16×16 f16→f32 (sm_70+, 16-aligned).
Implementations§
Source§impl MmaKind
impl MmaKind
Sourcepub fn operand_ctype(self) -> &'static str
pub fn operand_ctype(self) -> &'static str
The CUDA operand element type.
Sourcepub fn acc_ctype(self) -> &'static str
pub fn acc_ctype(self) -> &'static str
The accumulator / output element type — float for the half paths, int for int8.
Sourcepub fn is_tensor_core(self) -> bool
pub fn is_tensor_core(self) -> bool
Whether this runs on the tensor cores (WMMA) vs the CUDA cores (DP4A).
Sourcepub fn operand_bytes(self) -> usize
pub fn operand_bytes(self) -> usize
Bytes per operand element — 2 for bf16/f16, 1 for int8. Sizes shared-memory footprints and the
cp.async elements-per-16-byte-chunk (EPC = 16 / operand_bytes).
Sourcepub fn host_convert(self, expr: &str) -> String
pub fn host_convert(self, expr: &str) -> String
Host-side conversion of a float expr into this kind’s operand type.
Trait Implementations§
impl Copy for MmaKind
impl Eq for MmaKind
impl StructuralPartialEq for MmaKind
Auto Trait Implementations§
impl Freeze for MmaKind
impl RefUnwindSafe for MmaKind
impl Send for MmaKind
impl Sync for MmaKind
impl Unpin for MmaKind
impl UnsafeUnpin for MmaKind
impl UnwindSafe for MmaKind
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.