Skip to content

Commit e13e410

Browse files
Dan-FloresNicolasHugDaniel Flores
authored
Use CUDA 13.0 on CI (#911)
Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Daniel Flores <[email protected]>
1 parent af10398 commit e13e410

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/linux_cuda_wheel.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ jobs:
6767
# For the actual release we should add that label and change this to
6868
# include more python versions.
6969
python-version: ['3.10']
70-
# We test against 12.6 to avoid having too big of a CI matrix,
70+
# We test against 12.6 and 13.0 to avoid having too big of a CI matrix,
7171
# but for releases we should add 12.8.
72-
# TODO add 13.0!
73-
cuda-version: ['12.6']
72+
cuda-version: ['12.6', '13.0']
7473
# TODO: put back ffmpeg 5 https://github.com/pytorch/torchcodec/issues/325
7574
ffmpeg-version-for-tests: ['4.4.2', '6', '7']
7675

test/test_decoders.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,9 @@ def test_full_and_studio_range_bt709_video(self, asset):
12231223
gpu_frame = decoder_gpu.get_frame_at(frame_index).data.cpu()
12241224
cpu_frame = decoder_cpu.get_frame_at(frame_index).data
12251225

1226-
if cuda_version_used_for_building_torch() >= (12, 9):
1226+
if cuda_version_used_for_building_torch() >= (13, 0):
1227+
torch.testing.assert_close(gpu_frame, cpu_frame, rtol=0, atol=3)
1228+
elif cuda_version_used_for_building_torch() >= (12, 9):
12271229
torch.testing.assert_close(gpu_frame, cpu_frame, rtol=0, atol=2)
12281230
elif cuda_version_used_for_building_torch() == (12, 8):
12291231
assert psnr(gpu_frame, cpu_frame) > 20

test/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def psnr(a, b, max_val=255) -> float:
7373
def assert_frames_equal(*args, **kwargs):
7474
if sys.platform == "linux":
7575
if args[0].device.type == "cuda":
76-
atol = 2
76+
atol = 3 if cuda_version_used_for_building_torch() >= (13, 0) else 2
7777
if get_ffmpeg_major_version() == 4:
7878
assert_tensor_close_on_at_least(
7979
args[0], args[1], percentage=95, atol=atol

0 commit comments

Comments
 (0)