#[non_exhaustive]pub enum TensorWidth {
Fp32,
Stored,
}Expand description
Element width an extraction asks the native extractor for.
Native extraction converts packed, half-precision, bfloat16 and INT8 storage to FP32 unless the
caller asks for stored storage, so the width decides both the native conversion and which reader
applies to the result. TensorWidth::Fp32 returns elemsize 4 values that
OutputGuard::as_f32_slice reads directly; TensorWidth::Stored keeps the width the
producing layer wrote, which Mat::to_i8 and
Mat::to_f32_typed read.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fp32
Convert to unpacked FP32 inside the native extractor.
Stored
Keep the element width the producing layer wrote.
Trait Implementations§
Source§impl Clone for TensorWidth
impl Clone for TensorWidth
impl Copy for TensorWidth
Source§impl Debug for TensorWidth
impl Debug for TensorWidth
impl Eq for TensorWidth
Source§impl PartialEq for TensorWidth
impl PartialEq for TensorWidth
impl StructuralPartialEq for TensorWidth
Auto Trait Implementations§
impl Freeze for TensorWidth
impl RefUnwindSafe for TensorWidth
impl Send for TensorWidth
impl Sync for TensorWidth
impl Unpin for TensorWidth
impl UnsafeUnpin for TensorWidth
impl UnwindSafe for TensorWidth
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