Skip to content

Commit 2c07f58

Browse files
authored
Skip torch.compile tests on python 3.14 (#1073)
1 parent 219cc02 commit 2c07f58

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

test/test_decoders.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
BT709_FULL_RANGE,
3030
cuda_version_used_for_building_torch,
3131
get_ffmpeg_major_version,
32+
get_python_version,
3233
H264_10BITS,
3334
H265_10BITS,
3435
H265_VIDEO,
@@ -1147,6 +1148,10 @@ def test_get_key_frame_indices(self, device):
11471148

11481149
# TODO investigate why this fails internally.
11491150
@pytest.mark.skipif(in_fbcode(), reason="Compile test fails internally.")
1151+
@pytest.mark.skipif(
1152+
get_python_version() >= (3, 14),
1153+
reason="torch.compile is not supported on Python 3.14+",
1154+
)
11501155
@pytest.mark.parametrize("device", all_supported_devices())
11511156
def test_compile(self, device):
11521157
decoder, device = make_video_decoder(NASA_VIDEO.path, device=device)

test/test_ops.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from .utils import (
4343
all_supported_devices,
4444
assert_frames_equal,
45+
get_python_version,
4546
NASA_AUDIO,
4647
NASA_AUDIO_MP3,
4748
NASA_VIDEO,
@@ -368,6 +369,10 @@ def test_throws_exception_if_seek_too_far(self, device):
368369
with pytest.raises(IndexError, match="no more frames"):
369370
get_next_frame(decoder)
370371

372+
@pytest.mark.skipif(
373+
get_python_version() >= (3, 14),
374+
reason="torch.compile is not supported on Python 3.14+",
375+
)
371376
@pytest.mark.parametrize("device", all_supported_devices())
372377
def test_compile_seek_and_next(self, device):
373378
# TODO_OPEN_ISSUE Scott (T180277797): Get this to work with the inductor stack. Right now

test/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def get_ffmpeg_minor_version():
104104
return int(ffmpeg_version.split(".")[1])
105105

106106

107+
def get_python_version() -> tuple[int, int]:
108+
return (sys.version_info.major, sys.version_info.minor)
109+
110+
107111
def cuda_version_used_for_building_torch() -> Optional[tuple[int, int]]:
108112
# Return the CUDA version that was used to build PyTorch. That's not always
109113
# the same as the CUDA version that is currently installed on the running

0 commit comments

Comments
 (0)