MCPcopy
hub / github.com/OpenPPL/ppq / build_quant_pipeline

Method build_quant_pipeline

ppq/samples/Tutorial/fusion.py:82–89  ·  view source on GitHub ↗
(self, setting: QuantizationSetting)

Source from the content-addressed store, hash-verified

80# ------------------------------------------------------------
81class MyQuantizer(TensorRTQuantizer):
82 def build_quant_pipeline(self, setting: QuantizationSetting) -> QuantizationOptimizationPipeline:
83 return QuantizationOptimizationPipeline([
84 QuantizeSimplifyPass(),
85 ParameterQuantizePass(),
86 MyFusion(name='My Optimization Procedure'),
87 RuntimeCalibrationPass(),
88 QuantAlignmentPass(),
89 PassiveParameterQuantizePass()])
90
91from ppq.api import quantize_torch_model, register_network_quantizer
92register_network_quantizer(quantizer=MyQuantizer, platform=TargetPlatform.EXTENSION)

Callers

nothing calls this directly

Tested by

no test coverage detected