Skip to main content

StoredDtype

Enum StoredDtype 

Source
pub enum StoredDtype {
Show 19 variants Bool, U8, I8, I16, U16, F16, BF16, I32, U32, F32, F64, I64, U64, C64, F8E4M3, F4, F8E8M0, F8E5M2, Other(String),
}
Expand description

Backend-neutral description of a checkpoint’s stored scalar encoding.

Variants§

§

Bool

Boolean values.

§

U8

Unsigned 8-bit integers.

§

I8

Signed 8-bit integers.

§

I16

Signed 16-bit integers.

§

U16

Unsigned 16-bit integers.

§

F16

IEEE half-precision floating point.

§

BF16

Brain floating point.

§

I32

Signed 32-bit integers.

§

U32

Unsigned 32-bit integers.

§

F32

IEEE single-precision floating point.

§

F64

IEEE double-precision floating point.

§

I64

Signed 64-bit integers.

§

U64

Unsigned 64-bit integers.

§

C64

Complex values with two 32-bit floating-point components.

§

F8E4M3

Encoded FP8 E4M3 bytes.

§

F4

Packed FP4 E2M1 values.

§

F8E8M0

Unsigned E8M0 scale bytes used by MX formats.

§

F8E5M2

Encoded FP8 E5M2 bytes.

§

Other(String)

Another storage encoding not represented by a named variant.

Trait Implementations§

Source§

impl Clone for StoredDtype

Source§

fn clone(&self) -> StoredDtype

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StoredDtype

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for StoredDtype

Source§

impl From<StoredDtype> for RecipeDtype

Source§

fn from(value: StoredDtype) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for StoredDtype

Source§

fn eq(&self, other: &StoredDtype) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StoredDtype

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.