From b40c0b1e0010079bcc79365f65ca6f91668b6312 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Mon, 14 Aug 2023 15:12:43 +0800 Subject: [PATCH] Support torch > 1.8.0 Signed-off-by: Cheng, Penghui --- neural_compressor/adaptor/pytorch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_compressor/adaptor/pytorch.py b/neural_compressor/adaptor/pytorch.py index 9df61747c74..a2f82a26dcf 100644 --- a/neural_compressor/adaptor/pytorch.py +++ b/neural_compressor/adaptor/pytorch.py @@ -847,7 +847,7 @@ def __init__(self, framework_specific_info): self.fp32_results = [] self.fp32_preds_as_label = False - if self.version.release >= Version("2.0").release: + if self.version.release >= Version("1.8").release: static_quant_mapping = tq.quantization_mappings.get_default_static_quant_module_mappings() self.fused_op_list = \ [static_quant_mapping[key] for key in static_quant_mapping if "intrinsic." in str(key)]