Skip to content

Commit 49203f1

Browse files
author
chenhao388
committed
skip some test cases in test_compile.py when python is 3.14+
1 parent 63a6bc4 commit 49203f1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/test_compile.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import importlib.util
88
import inspect
99
import platform
10+
import sys
1011
from pathlib import Path
1112
from typing import Any, Callable
1213

@@ -60,6 +61,9 @@
6061
npu_device_count = torch.npu.device_count()
6162

6263

64+
@pytest.mark.skipif(
65+
sys.version_info > (3, 14), reason="torch.compile is not supported on python 3.14+ "
66+
)
6367
def test_vmap_compile():
6468
# Since we monkey patch vmap we need to make sure compile is happy with it
6569
def func(x, y):
@@ -76,6 +80,9 @@ def func(x, y):
7680
@pytest.mark.skipif(
7781
TORCH_VERSION < version.parse("2.4.0"), reason="requires torch>=2.4"
7882
)
83+
@pytest.mark.skipif(
84+
sys.version_info > (3, 14), reason="torch.compile is not supported on python 3.14+ "
85+
)
7986
@pytest.mark.parametrize("mode", [None, "reduce-overhead"])
8087
class TestTD:
8188
def test_tensor_output(self, mode):
@@ -366,6 +373,9 @@ class MyClass:
366373
@pytest.mark.skipif(
367374
TORCH_VERSION < version.parse("2.4.0"), reason="requires torch>=2.4"
368375
)
376+
@pytest.mark.skipif(
377+
sys.version_info > (3, 14), reason="torch.compile is not supported on python 3.14+ "
378+
)
369379
@pytest.mark.parametrize("mode", [None, "reduce-overhead"])
370380
class TestTC:
371381
def test_tc_tensor_output(self, mode):
@@ -630,6 +640,9 @@ def func_c_mytd():
630640
@pytest.mark.skipif(
631641
TORCH_VERSION < version.parse("2.4.0"), reason="requires torch>=2.4"
632642
)
643+
@pytest.mark.skipif(
644+
sys.version_info > (3, 14), reason="torch.compile is not supported on python 3.14+ "
645+
)
633646
@pytest.mark.parametrize("mode", [None, "reduce-overhead"])
634647
class TestNN:
635648
def test_func(self, mode):
@@ -734,6 +747,9 @@ def test_prob_module_with_kwargs(self, mode):
734747
@pytest.mark.skipif(
735748
TORCH_VERSION <= version.parse("2.4.0"), reason="requires torch>2.4"
736749
)
750+
@pytest.mark.skipif(
751+
sys.version_info > (3, 14), reason="torch.compile is not supported on python 3.14+ "
752+
)
737753
@pytest.mark.parametrize("mode", [None, "reduce-overhead"])
738754
class TestFunctional:
739755
def test_functional_error(self, mode):
@@ -1032,6 +1048,9 @@ def to_numpy(tensor):
10321048
(TORCH_VERSION <= version.parse("2.7.0")) and _IS_OSX,
10331049
reason="requires torch>=2.7 ons OSX",
10341050
)
1051+
@pytest.mark.skipif(
1052+
sys.version_info > (3, 14), reason="torch.compile is not supported on python 3.14+ "
1053+
)
10351054
@pytest.mark.parametrize("compiled", [False, True])
10361055
class TestCudaGraphs:
10371056
@pytest.fixture(scope="class", autouse=True)

0 commit comments

Comments
 (0)