pub struct Quantization<MP: MatmulPrecision> {
pub scaling_lhs: MP::ES,
pub scaling_rhs: MP::ES,
}
Expand description
Store the quantization meta-parameters. For now, we only support symmetric quantization, thus we only store the scaling.
Fields§
§scaling_lhs: MP::ES
§scaling_rhs: MP::ES
Implementations§
Source§impl<MP: MatmulPrecision> Quantization<MP>
impl<MP: MatmulPrecision> Quantization<MP>
pub fn dequantize(&self, line: Line<MP::EI>, ident: InputIdent) -> Line<MP::ES>
pub fn __expand_dequantize( context: &mut Scope, this: <Self as CubeType>::ExpandType, line: <Line<MP::EI> as CubeType>::ExpandType, ident: InputIdent, ) -> <Line<MP::ES> as CubeType>::ExpandType
Trait Implementations§
Source§impl<MP: Clone + MatmulPrecision> Clone for Quantization<MP>
impl<MP: Clone + MatmulPrecision> Clone for Quantization<MP>
Source§fn clone(&self) -> Quantization<MP>
fn clone(&self) -> Quantization<MP>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<MP: MatmulPrecision> CubeType for Quantization<MP>
impl<MP: MatmulPrecision> CubeType for Quantization<MP>
type ExpandType = QuantizationExpand<MP>
Source§fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
impl<MP: Copy + MatmulPrecision> Copy for Quantization<MP>
Auto Trait Implementations§
impl<MP> Freeze for Quantization<MP>
impl<MP> RefUnwindSafe for Quantization<MP>
impl<MP> Send for Quantization<MP>
impl<MP> Sync for Quantization<MP>
impl<MP> Unpin for Quantization<MP>
impl<MP> UnwindSafe for Quantization<MP>
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