Skip to content

Commit 3be131f

Browse files
committed
separate cuda assert_close condition
1 parent 6f869de commit 3be131f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test_ops.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,10 @@ def test_video_encoder_round_trip(self, tmp_path, format, method, device):
12141214

12151215
# If FFmpeg selects a codec or pixel format that does lossy encoding, assert 99% of pixels
12161216
# are within a higher tolerance.
1217-
if ffmpeg_version == 6 or device == "cuda":
1217+
if ffmpeg_version == 6:
1218+
atol = 15
1219+
assert_close = partial(assert_tensor_close_on_at_least, percentage=99)
1220+
elif device == "cuda":
12181221
atol = 15
12191222
percentage = 98
12201223
assert_close = partial(

0 commit comments

Comments
 (0)