pub enum DType {
E2M1,
FP8E4M3,
FP8E5M2,
BF16,
FP16,
FP32,
}Expand description
Supported quantization and precision types for Atlas kernels.
Each variant maps to a specific bit-width and numeric format used by SM121 tensor cores or CUDA ALU paths.
Variants§
E2M1
4-bit floating point (1 sign + 2 exponent + 1 mantissa) Used for NVFP4 weight storage. Values: {0, 0.5, 1, 1.5, 2, 3, 4, 6}
FP8E4M3
8-bit floating point (1 sign + 4 exponent + 3 mantissa) Used for NVFP4 block scales and FP8 quantization
FP8E5M2
8-bit floating point (1 sign + 5 exponent + 2 mantissa) Used for some FP8 quantization schemes
BF16
16-bit brain floating point
FP16
16-bit IEEE floating point
FP32
32-bit IEEE floating point
Implementations§
Source§impl DType
impl DType
Sourcepub const fn element_size_bits(&self) -> usize
pub const fn element_size_bits(&self) -> usize
Size in bytes per element. E2M1 is sub-byte (4 bits) but we report the packed size (2 elements per byte).
Sourcepub const fn elements_per_u32(&self) -> usize
pub const fn elements_per_u32(&self) -> usize
Number of elements that pack into a 32-bit word.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DType
impl<'de> Deserialize<'de> for DType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for DType
impl Eq for DType
impl StructuralPartialEq for DType
Auto Trait Implementations§
impl Freeze for DType
impl RefUnwindSafe for DType
impl Send for DType
impl Sync for DType
impl Unpin for DType
impl UnwindSafe for DType
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,
§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
Compare self to
key and return true if they are equal.