Skip to content

Commit 9102fb8

Browse files
committed
enable dequantize for TorchAO tester mixin
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
1 parent bab2547 commit 9102fb8

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

tests/models/testing_utils/quantization.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,18 @@ def test_torchao_device_map(self):
931931
"""Test that device_map='auto' works correctly with quantization."""
932932
self._test_quantization_device_map(TorchAoConfigMixin.TORCHAO_QUANT_TYPES["int8wo"])
933933

934-
def test_torchao_dequantize(self):
934+
@pytest.mark.parametrize(
935+
"quant_type",
936+
[
937+
pytest.param("int4wo", marks=_int4wo_skip),
938+
"int8wo",
939+
"int8dq",
940+
],
941+
ids=["int4wo", "int8wo", "int8dq"],
942+
)
943+
def test_torchao_dequantize(self, quant_type):
935944
"""Test that dequantize() works correctly."""
936-
self._test_dequantize(TorchAoConfigMixin.TORCHAO_QUANT_TYPES["int8wo"])
945+
self._test_dequantize(TorchAoConfigMixin.TORCHAO_QUANT_TYPES[quant_type])
937946

938947
def test_torchao_training(self):
939948
"""Test that quantized models can be used for training with adapters."""

0 commit comments

Comments
 (0)