pub enum StoragePrecision {
Fp16,
Bf16,
}Expand description
Storage precision for matrix values.
Variants§
Fp16
IEEE 754 half-precision (FP16, 10-bit mantissa).
Bf16
Brain floating-point (BF16, 7-bit mantissa, wider exponent range).
Implementations§
Source§impl StoragePrecision
impl StoragePrecision
Sourcepub const fn ptx_type(self) -> PtxType
pub const fn ptx_type(self) -> PtxType
Returns the PTX type corresponding to this storage precision.
Sourcepub const fn packed_ptx_type(self) -> PtxType
pub const fn packed_ptx_type(self) -> PtxType
Returns the packed (x2) PTX type for this precision.
Sourcepub const fn element_bytes(self) -> u32
pub const fn element_bytes(self) -> u32
Bytes per element.
Sourcepub const fn mantissa_bits(self) -> u32
pub const fn mantissa_bits(self) -> u32
Mantissa bits (for error analysis).
Trait Implementations§
Source§impl Clone for StoragePrecision
impl Clone for StoragePrecision
Source§fn clone(&self) -> StoragePrecision
fn clone(&self) -> StoragePrecision
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 StoragePrecision
Source§impl Debug for StoragePrecision
impl Debug for StoragePrecision
impl Eq for StoragePrecision
Source§impl Hash for StoragePrecision
impl Hash for StoragePrecision
Source§impl PartialEq for StoragePrecision
impl PartialEq for StoragePrecision
Source§fn eq(&self, other: &StoragePrecision) -> bool
fn eq(&self, other: &StoragePrecision) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoragePrecision
Auto Trait Implementations§
impl Freeze for StoragePrecision
impl RefUnwindSafe for StoragePrecision
impl Send for StoragePrecision
impl Sync for StoragePrecision
impl Unpin for StoragePrecision
impl UnsafeUnpin for StoragePrecision
impl UnwindSafe for StoragePrecision
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