pub struct PackedTensorInfo {
pub logical_shape: Vec<usize>,
pub elements: usize,
}Expand description
Logical shape of a nibble-packed INT4 tensor, since the packed U8 tensor’s own shape
([ceil(n / 2)]) doesn’t reflect it. See crate::quant::pack4.
Fields§
§logical_shape: Vec<usize>The tensor’s shape before packing.
elements: usizelogical_shape.iter().product(), for convenience.
Trait Implementations§
Source§impl Clone for PackedTensorInfo
impl Clone for PackedTensorInfo
Source§fn clone(&self) -> PackedTensorInfo
fn clone(&self) -> PackedTensorInfo
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 moreSource§impl Debug for PackedTensorInfo
impl Debug for PackedTensorInfo
Source§impl<'de> Deserialize<'de> for PackedTensorInfo
impl<'de> Deserialize<'de> for PackedTensorInfo
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
Auto Trait Implementations§
impl Freeze for PackedTensorInfo
impl RefUnwindSafe for PackedTensorInfo
impl Send for PackedTensorInfo
impl Sync for PackedTensorInfo
impl Unpin for PackedTensorInfo
impl UnsafeUnpin for PackedTensorInfo
impl UnwindSafe for PackedTensorInfo
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