Skip to content

Commit 58a7c80

Browse files
committed
Add needs_cuda to GPU decoder tests
1 parent d59398b commit 58a7c80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_video_gpu_decoder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import pytest
55
import torch
6+
from test.common_utils import needs_cuda
67
from torchvision.io import _HAS_GPU_VIDEO_DECODER, VideoReader
78

89
try:
@@ -13,6 +14,7 @@
1314
VIDEO_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "videos")
1415

1516

17+
@needs_cuda
1618
@pytest.mark.skipif(_HAS_GPU_VIDEO_DECODER is False, reason="Didn't compile with support for gpu decoder")
1719
class TestVideoGPUDecoder:
1820
@pytest.mark.skipif(av is None, reason="PyAV unavailable")

0 commit comments

Comments
 (0)