pub struct QuantisationPass {
pub target_dtype: QuantTarget,
pub mode: QuantMode,
}Expand description
Quantisation pass: inserts quantize/dequantize pairs around compute-heavy ops to reduce memory footprint and accelerate inference.
Supported modes:
- Dynamic: insert Q/DQ around MatMul and Linear
- Static: insert Q/DQ with pre-computed scales from calibration
Fields§
§target_dtype: QuantTarget§mode: QuantModeTrait Implementations§
Source§impl Debug for QuantisationPass
impl Debug for QuantisationPass
Source§impl Default for QuantisationPass
impl Default for QuantisationPass
Source§impl Pass for QuantisationPass
impl Pass for QuantisationPass
fn name(&self) -> &str
fn run(&self, ctx: &mut Context, _cache: &mut AnalysisCache) -> PassResult
fn invalidates(&self) -> Vec<&str>
Auto Trait Implementations§
impl Freeze for QuantisationPass
impl RefUnwindSafe for QuantisationPass
impl Send for QuantisationPass
impl Sync for QuantisationPass
impl Unpin for QuantisationPass
impl UnsafeUnpin for QuantisationPass
impl UnwindSafe for QuantisationPass
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