pub enum QuantizationScale {
PerTensor,
PerChannel {
axis: u32,
},
PerGroup {
group_size: u32,
},
}Expand description
Scale metadata layout for a quantized tensor or vector.
Variants§
PerTensor
One scale value for the whole buffer.
PerChannel
One scale value per slice along axis.
PerGroup
One scale value per contiguous group.
Trait Implementations§
Source§impl Clone for QuantizationScale
impl Clone for QuantizationScale
Source§fn clone(&self) -> QuantizationScale
fn clone(&self) -> QuantizationScale
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 QuantizationScale
impl Debug for QuantizationScale
Source§impl<'de> Deserialize<'de> for QuantizationScale
impl<'de> Deserialize<'de> for QuantizationScale
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
Source§impl Display for QuantizationScale
impl Display for QuantizationScale
Source§impl Hash for QuantizationScale
impl Hash for QuantizationScale
Source§impl PartialEq for QuantizationScale
impl PartialEq for QuantizationScale
Source§fn eq(&self, other: &QuantizationScale) -> bool
fn eq(&self, other: &QuantizationScale) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for QuantizationScale
impl Serialize for QuantizationScale
impl Eq for QuantizationScale
impl StructuralPartialEq for QuantizationScale
Auto Trait Implementations§
impl Freeze for QuantizationScale
impl RefUnwindSafe for QuantizationScale
impl Send for QuantizationScale
impl Sync for QuantizationScale
impl Unpin for QuantizationScale
impl UnsafeUnpin for QuantizationScale
impl UnwindSafe for QuantizationScale
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