Skip to content

Commit 8418e52

Browse files
Skip torch.compile test on Python 3.14 and torch < 2.10 (not supported)
1 parent ff5a6b4 commit 8418e52

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/test_linear4bit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import pickle
44
import platform
5+
import sys
56
from tempfile import TemporaryDirectory
67

78
import pytest
@@ -320,6 +321,7 @@ def test_params4bit_real_serialization(device, quant_type, blocksize, compress_s
320321
@pytest.mark.parametrize("fullgraph", TRUE_FALSE, ids=id_formatter("fullgraph"))
321322
@pytest.mark.parametrize("mode", ["default", "reduce-overhead"], ids=id_formatter("mode"))
322323
@pytest.mark.skipif(torch.__version__ < (2, 4), reason="Not supported in torch < 2.4")
324+
@pytest.mark.skipif(torch.__version__ < (2, 10) and sys.version_info >= (3, 14), reason="Not supported in Python 3.14 until torch 2.10")
323325
def test_linear4bit_torch_compile(device, quant_type, compute_dtype, compress_statistics, bias, fullgraph, mode):
324326
if device == "hpu" and not is_supported_on_hpu(quant_type):
325327
pytest.skip("This configuration is not supported on HPU.")

tests/test_linear8bitlt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
import pickle
55
import platform
6+
import sys
67
from tempfile import TemporaryDirectory
78

89
import pytest
@@ -234,6 +235,7 @@ def test_linear8bit_serialization(linear8bit):
234235
@pytest.mark.parametrize("fullgraph", TRUE_FALSE, ids=id_formatter("fullgraph"))
235236
@pytest.mark.parametrize("mode", ["default", "reduce-overhead"], ids=id_formatter("mode"))
236237
@pytest.mark.skipif(torch.__version__ < (2, 4), reason="Not supported in torch < 2.4")
238+
@pytest.mark.skipif(torch.__version__ < (2, 10) and sys.version_info >= (3, 14), reason="Not supported in Python 3.14 until torch 2.10")
237239
@pytest.mark.skipif(ROCM_WARP_SIZE_64, reason="this test is not supported on ROCm yet")
238240
def test_linear8bitlt_torch_compile(device, threshold, bias, fullgraph, mode):
239241
if device == "cuda" and platform.system() == "Windows":

0 commit comments

Comments
 (0)