Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/test_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
BT709_FULL_RANGE,
cuda_version_used_for_building_torch,
get_ffmpeg_major_version,
get_python_version,
H264_10BITS,
H265_10BITS,
H265_VIDEO,
Expand Down Expand Up @@ -1147,6 +1148,10 @@ def test_get_key_frame_indices(self, device):

# TODO investigate why this fails internally.
@pytest.mark.skipif(in_fbcode(), reason="Compile test fails internally.")
@pytest.mark.skipif(
get_python_version() >= (3, 14),
reason="torch.compile is not supported on Python 3.14+",
)
@pytest.mark.parametrize("device", all_supported_devices())
def test_compile(self, device):
decoder, device = make_video_decoder(NASA_VIDEO.path, device=device)
Expand Down
5 changes: 5 additions & 0 deletions test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from .utils import (
all_supported_devices,
assert_frames_equal,
get_python_version,
NASA_AUDIO,
NASA_AUDIO_MP3,
NASA_VIDEO,
Expand Down Expand Up @@ -368,6 +369,10 @@ def test_throws_exception_if_seek_too_far(self, device):
with pytest.raises(IndexError, match="no more frames"):
get_next_frame(decoder)

@pytest.mark.skipif(
get_python_version() >= (3, 14),
reason="torch.compile is not supported on Python 3.14+",
)
@pytest.mark.parametrize("device", all_supported_devices())
def test_compile_seek_and_next(self, device):
# TODO_OPEN_ISSUE Scott (T180277797): Get this to work with the inductor stack. Right now
Expand Down
4 changes: 4 additions & 0 deletions test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def get_ffmpeg_minor_version():
return int(ffmpeg_version.split(".")[1])


def get_python_version() -> tuple[int, int]:
return (sys.version_info.major, sys.version_info.minor)


def cuda_version_used_for_building_torch() -> Optional[tuple[int, int]]:
# Return the CUDA version that was used to build PyTorch. That's not always
# the same as the CUDA version that is currently installed on the running
Expand Down