Skip to content

Commit 884d86a

Browse files
committed
Increase tol
1 parent 6f881d1 commit 884d86a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import os
44
import pathlib
5+
import platform
56
import subprocess
67
import sys
78

@@ -138,7 +139,7 @@ def psnr(a, b, max_val=255) -> float:
138139
# not guarantee bit-for-bit equality across systems and architectures, so we
139140
# also cannot. We currently use Linux on x86_64 as our reference system.
140141
def assert_frames_equal(*args, **kwargs):
141-
if sys.platform == "linux":
142+
if sys.platform == "linux" and "x86" in platform.machine():
142143
if args[0].device.type == "cuda":
143144
atol = 3 if cuda_version_used_for_building_torch() >= (13, 0) else 2
144145
if get_ffmpeg_major_version() == 4:
@@ -150,6 +151,7 @@ def assert_frames_equal(*args, **kwargs):
150151
else:
151152
torch.testing.assert_close(*args, **kwargs, atol=0, rtol=0)
152153
else:
154+
# Here: Windows, MacOS, and Linux for non-x86 architectures like aarch64
153155
torch.testing.assert_close(*args, **kwargs, atol=3, rtol=0)
154156

155157

0 commit comments

Comments
 (0)