pub enum CoopMatrixComponentType {
F16,
F32,
I8,
U8,
}Expand description
Scalar component types supported by cooperative-matrix operations.
Variants§
F16
16-bit IEEE 754 half-precision float.
F32
32-bit IEEE 754 single-precision float.
I8
8-bit signed integer (used as accumulator in int8 GEMM paths).
U8
8-bit unsigned integer (used as input in int8 GEMM paths).
Implementations§
Source§impl CoopMatrixComponentType
impl CoopMatrixComponentType
Sourcepub fn as_wgsl(self) -> &'static str
pub fn as_wgsl(self) -> &'static str
Return the corresponding WGSL type keyword.
§Examples
use oxigdal_gpu::cooperative_matrix::CoopMatrixComponentType;
assert_eq!(CoopMatrixComponentType::F32.as_wgsl(), "f32");
assert_eq!(CoopMatrixComponentType::F16.as_wgsl(), "f16");Sourcepub fn byte_size(self) -> u32
pub fn byte_size(self) -> u32
Return the byte size of one element of this type.
Both I8 and U8 report 4 because WGSL maps them to i32/u32
in storage buffers (WGSL has no native 8-bit storage type).
§Examples
use oxigdal_gpu::cooperative_matrix::CoopMatrixComponentType;
assert_eq!(CoopMatrixComponentType::F16.byte_size(), 2);
assert_eq!(CoopMatrixComponentType::F32.byte_size(), 4);Trait Implementations§
Source§impl Clone for CoopMatrixComponentType
impl Clone for CoopMatrixComponentType
Source§fn clone(&self) -> CoopMatrixComponentType
fn clone(&self) -> CoopMatrixComponentType
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 moreimpl Copy for CoopMatrixComponentType
Source§impl Debug for CoopMatrixComponentType
impl Debug for CoopMatrixComponentType
impl Eq for CoopMatrixComponentType
Source§impl PartialEq for CoopMatrixComponentType
impl PartialEq for CoopMatrixComponentType
Source§fn eq(&self, other: &CoopMatrixComponentType) -> bool
fn eq(&self, other: &CoopMatrixComponentType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CoopMatrixComponentType
Auto Trait Implementations§
impl Freeze for CoopMatrixComponentType
impl RefUnwindSafe for CoopMatrixComponentType
impl Send for CoopMatrixComponentType
impl Sync for CoopMatrixComponentType
impl Unpin for CoopMatrixComponentType
impl UnsafeUnpin for CoopMatrixComponentType
impl UnwindSafe for CoopMatrixComponentType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.