Skip to content

Commit f62e955

Browse files
author
Bruno Korbar
committed
Test GPU output
1 parent fc6d44e commit f62e955

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/test_video_gpu_decoder.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
@pytest.mark.skipif(_HAS_GPU_VIDEO_DECODER is False, reason="Didn't compile with support for gpu decoder")
1818
class TestVideoGPUDecoder:
19+
torchvision.set_video_backend("cuda")
1920
@pytest.mark.skipif(av is None, reason="PyAV unavailable")
2021
@pytest.mark.parametrize(
2122
"video_file",
@@ -30,7 +31,7 @@ class TestVideoGPUDecoder:
3031
],
3132
)
3233
def test_frame_reading(self, video_file):
33-
torchvision.set_video_backend("cuda")
34+
# torchvision.set_video_backend("cuda")
3435
full_path = os.path.join(VIDEO_DIR, video_file)
3536
decoder = VideoReader(full_path)
3637
with av.open(full_path) as container:
@@ -56,7 +57,7 @@ def test_frame_reading(self, video_file):
5657
],
5758
)
5859
def test_seek_reading(self, keyframes, full_path, duration):
59-
torchvision.set_video_backend("cuda")
60+
# torchvision.set_video_backend("cuda")
6061
decoder = VideoReader(full_path)
6162
time = duration / 2
6263
decoder.seek(time, keyframes_only=keyframes)
@@ -82,7 +83,7 @@ def test_seek_reading(self, keyframes, full_path, duration):
8283
],
8384
)
8485
def test_metadata(self, video_file):
85-
torchvision.set_video_backend("cuda")
86+
8687
full_path = os.path.join(VIDEO_DIR, video_file)
8788
decoder = VideoReader(full_path)
8889
video_metadata = decoder.get_metadata()["video"]

0 commit comments

Comments
 (0)