pub enum Storage {
Word,
Byte,
Quarter(Fp8Format),
Half,
}Expand description
How a tensor’s scalars are laid out in the storage words a kernel addresses.
Variants§
Word
One 32-bit word per element (FP32, INT32).
Byte
One byte per element, four to a word (BOOL).
Quarter(Fp8Format)
One byte per element, four to a word, holding an FP8 encoding. Geometrically identical
to Self::Byte; it is a separate variant because the byte is a raw float pattern, not
a canonical 0/1, so it is loaded through an exact widening and moved as raw bits
(ADR 0009).
Half
Two bytes per element, two to a word (FP16); the 16-bit lanes are unpacked on load and
repacked with OpAtomicAnd/OpAtomicOr on store, so a kernel never modifies the
neighbouring element of its word.
Implementations§
Trait Implementations§
impl Copy for Storage
impl Eq for Storage
impl StructuralPartialEq for Storage
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storage
impl UnwindSafe for Storage
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