We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aaa1e8 commit ec91729Copy full SHA for ec91729
test/utils.py
@@ -11,6 +11,8 @@
11
12
import torch
13
14
+from torchcodec.decoders._core import get_ffmpeg_library_versions
15
+
16
17
# Decorator for skipping CUDA tests when CUDA isn't available. The tests are
18
# effectively marked to be skipped in pytest_collection_modifyitems() of
@@ -31,8 +33,11 @@ def cpu_and_cuda():
31
33
def assert_frames_equal(*args, **kwargs):
32
34
if sys.platform == "linux":
35
if args[0].device.type == "cuda":
36
+ ffmpeg_major_version = int(
37
+ get_ffmpeg_library_versions()["ffmpeg_version"].split(".")[0]
38
+ )
39
atol = 2
- if in_fbcode():
40
+ if in_fbcode() or ffmpeg_major_version == 4:
41
assert_tensor_close_on_at_least(
42
args[0], args[1], percentage=95, atol=atol
43
)
0 commit comments