Skip to content

Commit 4624311

Browse files
committed
refine per review comments
Signed-off-by: xin3he <xin3.he@intel.com>
1 parent ce10e9c commit 4624311

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

neural_compressor/torch/quantization/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626

2727
# TODO(Yi): move config to config.py
28-
from .autotune import autotune, TuningConfig, get_default_tune_config
28+
from neural_compressor.torch.quantization.autotune import autotune, TuningConfig, get_default_tune_config
2929

3030
### Quantization Function Registration ###
3131
import neural_compressor.torch.quantization.weight_only

neural_compressor/torch/quantization/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def __init__(
9898
use_mse_search (bool): Enables mean squared error (MSE) search, default is False.
9999
use_layer_wise (bool): Enables quantize model per layer. Defaults to False.
100100
export_compressed_model (bool): Enables return model in int format or not. Defaults to False.
101+
use_double_quant (bool): Enables double quantization, default is False.
101102
double_quant_dtype (str): Data type for double_quant scale, default is "int".
102103
double_quant_bits (int): Number of bits used to represent double_quant scale, default is 4.
103104
double_quant_use_sym (bool): Indicates whether double_quant scale are symmetric, default is True.

test/3x/torch/quantization/weight_only/test_rtn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_mse_search(self):
102102
atol_false > atol_true
103103
), "use_mse_search=True doesn't help accuracy, maybe is reasonable, please double check."
104104
except:
105-
pass # atol is very close, double checked the logic.
105+
assert torch.allclose(atol_false, atol_true, atol=0.012), "atol is very close, double checked the logic."
106106

107107
def test_layer_wise(self):
108108
model = copy.deepcopy(self.tiny_gptj)

0 commit comments

Comments
 (0)