diff --git a/onnxruntime/python/tools/quantization/qdq_quantizer.py b/onnxruntime/python/tools/quantization/qdq_quantizer.py index 6895276e12..e475c4d033 100644 --- a/onnxruntime/python/tools/quantization/qdq_quantizer.py +++ b/onnxruntime/python/tools/quantization/qdq_quantizer.py @@ -86,8 +86,8 @@ class QDQQuantizer(ONNXQuantizer): # So, we don't recommend to add QDQ to node's output under such condition. self.op_types_to_exclude_output_quantization = ( [] - if "OpTypesToExcludeOutputQuantizatioin" not in extra_options - else extra_options["OpTypesToExcludeOutputQuantizatioin"] + if "OpTypesToExcludeOutputQuantization" not in extra_options + else extra_options["OpTypesToExcludeOutputQuantization"] ) # We do quantization on Dequantizelinear's input to remove Quantizelinear for weight as an optimization. diff --git a/onnxruntime/python/tools/quantization/quantize.py b/onnxruntime/python/tools/quantization/quantize.py index 4aa28d54de..80ae592d49 100644 --- a/onnxruntime/python/tools/quantization/quantize.py +++ b/onnxruntime/python/tools/quantization/quantize.py @@ -118,7 +118,7 @@ class StaticQuantConfig(QuantConfig): Default is False which quantizes floating-point weight and feeds it to solely inserted DeQuantizeLinear node. If True, it remains floating-point weight and inserts both QuantizeLinear/DeQuantizeLinear nodes to weight. - OpTypesToExcludeOutputQuantizatioin = list of op type : + OpTypesToExcludeOutputQuantization = list of op type : Default is []. If any op type is specified, it won't quantize the output of ops with this specific op types. DedicatedQDQPair = True/False : @@ -304,7 +304,7 @@ def quantize_static( Default is False which quantizes floating-point weight and feeds it to solely inserted DeQuantizeLinear node. If True, it remains floating-point weight and inserts both QuantizeLinear/DeQuantizeLinear nodes to weight. - OpTypesToExcludeOutputQuantizatioin = list of op type : + OpTypesToExcludeOutputQuantization = list of op type : Default is []. If any op type is specified, it won't quantize the output of ops with this specific op types. DedicatedQDQPair = True/False : diff --git a/onnxruntime/test/python/quantization/test_qdq.py b/onnxruntime/test/python/quantization/test_qdq.py index 35f6192ff6..c50fb9870b 100644 --- a/onnxruntime/test/python/quantization/test_qdq.py +++ b/onnxruntime/test/python/quantization/test_qdq.py @@ -101,7 +101,7 @@ class TestQDQExtraOptions(unittest.TestCase): { "ActivationSymmetric": True, "AddQDQPairToWeight": True, - "OpTypesToExcludeOutputQuantizatioin": [], + "OpTypesToExcludeOutputQuantization": [], }, ) # extra_options quantizer.quantize_model() @@ -202,7 +202,7 @@ class TestQDQExtraOptions(unittest.TestCase): { "ActivationSymmetric": True, "AddQDQPairToWeight": True, - "OpTypesToExcludeOutputQuantizatioin": op_types_to_quantize, + "OpTypesToExcludeOutputQuantization": op_types_to_quantize, "DedicatedQDQPair": True, }, ) # extra_options