File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
backends/qualcomm/quantizer
examples/qualcomm/oss_scripts Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 22from torch .ao .quantization .observer import UniformQuantizationObserverBase
33
44
5- class ParamObserver (UniformQuantizationObserverBase ):
5+ class PerChannelParamObserver (UniformQuantizationObserverBase ):
66 def __init__ (
77 self ,
88 ch_axis = 0 ,
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ def get_ptq_per_channel_quant_config(
270270 return quantization_config
271271
272272
273+ # TODO merge qat and ptq to a fucntion, and use a bool flag to control it
273274def get_8a8w_qnn_qat_config (
274275 act_symmetric : bool = False , act_observer = MovingAverageMinMaxObserver
275276) -> QuantizationConfig :
Original file line number Diff line number Diff line change 2222from torch .ao .quantization .quantizer import Quantizer
2323from torch .fx import GraphModule
2424
25+ from .annotators import OP_ANNOTATOR
26+
2527from .qconfig import (
2628 get_16a16w_qnn_ptq_config ,
2729 get_16a4w_qnn_ptq_config ,
3436 QuantizationConfig ,
3537)
3638
37- from .annotators import OP_ANNOTATOR
38-
3939__all__ = [
4040 "QnnQuantizer" ,
4141 "QuantDtype" ,
Original file line number Diff line number Diff line change 1414 QuantizationConfig ,
1515 QuantizationSpec ,
1616)
17- from executorch .backends .qualcomm .quantizer .observers .param_observer import (
18- ParamObserver ,
17+ from executorch .backends .qualcomm .quantizer .observers .per_channel_param_observer import (
18+ PerChannelParamObserver ,
1919)
2020from executorch .backends .qualcomm .quantizer .qconfig import (
2121 _derived_bias_quant_spec ,
You can’t perform that action at this time.
0 commit comments