Skip to content

Commit 4b5422c

Browse files
authored
Skip CUDA AV1 tests in fbcode (#941)
1 parent 9fa4fd1 commit 4b5422c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/test_decoders.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def test_get_frame_at_av1(self, device):
591591
if device == "cuda" and get_ffmpeg_major_version() == 4:
592592
return
593593

594-
if device == "cuda" and in_fbcode():
594+
if "cuda" in device and in_fbcode():
595595
pytest.skip("decoding on CUDA is not supported internally")
596596

597597
decoder = VideoDecoder(AV1_VIDEO.path, device=device)
@@ -1477,6 +1477,9 @@ def test_beta_cuda_interface_get_frame_at(
14771477
if seek_mode == "approximate" and not supports_approximate_mode(asset):
14781478
pytest.skip("asset doesn't work with approximate mode")
14791479

1480+
if in_fbcode() and asset is AV1_VIDEO:
1481+
pytest.skip("AV1 CUDA not supported internally")
1482+
14801483
ref_decoder = VideoDecoder(asset.path, device="cuda", seek_mode=seek_mode)
14811484
beta_decoder = VideoDecoder(
14821485
asset.path, device="cuda:0:beta", seek_mode=seek_mode
@@ -1522,6 +1525,8 @@ def test_beta_cuda_interface_get_frames_at(
15221525
):
15231526
if seek_mode == "approximate" and not supports_approximate_mode(asset):
15241527
pytest.skip("asset doesn't work with approximate mode")
1528+
if in_fbcode() and asset is AV1_VIDEO:
1529+
pytest.skip("AV1 CUDA not supported internally")
15251530

15261531
ref_decoder = VideoDecoder(asset.path, device="cuda", seek_mode=seek_mode)
15271532
beta_decoder = VideoDecoder(
@@ -1566,6 +1571,8 @@ def test_beta_cuda_interface_get_frames_at(
15661571
def test_beta_cuda_interface_get_frame_played_at(self, asset, seek_mode):
15671572
if seek_mode == "approximate" and not supports_approximate_mode(asset):
15681573
pytest.skip("asset doesn't work with approximate mode")
1574+
if in_fbcode() and asset is AV1_VIDEO:
1575+
pytest.skip("AV1 CUDA not supported internally")
15691576

15701577
ref_decoder = VideoDecoder(asset.path, device="cuda", seek_mode=seek_mode)
15711578
beta_decoder = VideoDecoder(
@@ -1607,6 +1614,8 @@ def test_beta_cuda_interface_get_frame_played_at(self, asset, seek_mode):
16071614
def test_beta_cuda_interface_get_frames_played_at(self, asset, seek_mode):
16081615
if seek_mode == "approximate" and not supports_approximate_mode(asset):
16091616
pytest.skip("asset doesn't work with approximate mode")
1617+
if in_fbcode() and asset is AV1_VIDEO:
1618+
pytest.skip("AV1 CUDA not supported internally")
16101619

16111620
ref_decoder = VideoDecoder(asset.path, device="cuda", seek_mode=seek_mode)
16121621
beta_decoder = VideoDecoder(
@@ -1649,6 +1658,8 @@ def test_beta_cuda_interface_get_frames_played_at(self, asset, seek_mode):
16491658
def test_beta_cuda_interface_backwards(self, asset, seek_mode):
16501659
if seek_mode == "approximate" and not supports_approximate_mode(asset):
16511660
pytest.skip("asset doesn't work with approximate mode")
1661+
if in_fbcode() and asset is AV1_VIDEO:
1662+
pytest.skip("AV1 CUDA not supported internally")
16521663

16531664
ref_decoder = VideoDecoder(asset.path, device="cuda", seek_mode=seek_mode)
16541665
beta_decoder = VideoDecoder(

0 commit comments

Comments
 (0)