Skip to content

Commit 39ce823

Browse files
Fix WOQ int8 failures (#884)
* Fix WOQ int8 failures * update readme * add dynamo reset for freezing case * re-trigger UT * re-trigger CI * trigger UT
1 parent d9abbf6 commit 39ce823

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

test/integration/test_integration.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,6 @@ def test_int8_dynamic_quant_subclass_api(self, device, dtype):
826826
@parameterized.expand(COMMON_DEVICE_DTYPE)
827827
@unittest.skipIf(is_fbcode(), "broken in fbcode")
828828
def test_int8_weight_only_quant_subclass_api(self, device, dtype):
829-
if TORCH_VERSION_AT_LEAST_2_5 and device == "cpu":
830-
self.skipTest("Regression introduced in PT nightlies")
831-
832829
undo_recommended_configs()
833830
self._test_lin_weight_subclass_api_impl(
834831
_int8wo_api, device, 40, test_dtype=dtype
@@ -838,9 +835,7 @@ def test_int8_weight_only_quant_subclass_api(self, device, dtype):
838835
@torch._inductor.config.patch({"freezing": True})
839836
@unittest.skipIf(not TORCH_VERSION_AT_LEAST_2_4, "freeze requires torch 2.4 and after.")
840837
def test_int8_weight_only_quant_with_freeze(self, device, dtype):
841-
if TORCH_VERSION_AT_LEAST_2_5 and device == "cpu":
842-
self.skipTest("Regression introduced in PT nightlies")
843-
838+
torch._dynamo.reset()
844839
self._test_lin_weight_subclass_api_impl(
845840
_int8wo_api, device, 40, test_dtype=dtype
846841
)
@@ -1054,10 +1049,7 @@ def test_save_load_dqtensors(self, device, dtype):
10541049
@parameterized.expand(COMMON_DEVICE_DTYPE)
10551050
@torch.no_grad()
10561051
@unittest.skipIf(is_fbcode(), "broken in fbcode")
1057-
def test_save_load_int8woqtensors(self, device, dtype):
1058-
if TORCH_VERSION_AT_LEAST_2_5 and device == "cpu":
1059-
self.skipTest(f"Regression introduced in PT nightlies")
1060-
1052+
def test_save_load_int8woqtensors(self, device, dtype):
10611053
undo_recommended_configs()
10621054
self._test_handle_save_load_meta_impl(_int8wo_api, device, test_dtype=dtype)
10631055

torchao/quantization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ but if you use 2.4 or before, you'll need to use `unwrap_tensor_subclass` as wel
246246

247247
Note that the workaround will not be needed after https://github.com/pytorch/pytorch/issues/129682 is fixed.
248248

249-
249+
Note that the workaround is also required for `torch.compile` with `freezing` (`torch._inductor.config.freezing=True`) until https://github.com/pytorch/pytorch/pull/136265 is fixed.
250250

251251
## Other Available Quantization Techniques
252252

0 commit comments

Comments
 (0)