Skip to content

Commit 1abd5e7

Browse files
Add CUDA 12.9 build (#1689)
* Add CUDA 12.9 to build/test workflows * Downgrade Jimver/cuda-toolkit to v0.2.24 * Update python-package.yml * Update python-package.yml * Update python-package.yml * Update tests.yml * Update tests.yml
1 parent aca9778 commit 1abd5e7

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.github/scripts/build-cuda.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ if [[ -v cuda_targets ]]; then
1111
elif [ "${build_arch}" = "aarch64" ]; then
1212
build_capability="75;80;90"
1313

14-
# CUDA 12.8: Add sm100
15-
[[ "${cuda_version}" == 12.8.* ]] && build_capability="75;80;90;100"
14+
# CUDA 12.8+: Add sm100/sm120
15+
[[ "${cuda_version}" == 12.8.* || "${cuda_version}" == 12.9.* ]] && build_capability="75;80;90;100;120"
1616
else
1717
# By default, target Maxwell through Hopper.
1818
build_capability="50;52;60;61;70;75;80;86;89;90"
1919

20-
# CUDA 12.8: Add sm100 and sm120; remove < sm75 to align with PyTorch 2.7+cu128 minimum
21-
[[ "${cuda_version}" == 12.8.* ]] && build_capability="75;80;86;89;90;100;120"
20+
# CUDA 12.8+: Add sm100 and sm120; remove < sm75 to align with PyTorch 2.7+cu128 minimum
21+
[[ "${cuda_version}" == 12.8.* || "${cuda_version}" == 12.9.* ]] && build_capability="75;80;86;89;90;100;120"
2222
fi
2323

2424
[[ "${build_os}" = windows-* ]] && python3 -m pip install ninja

.github/workflows/python-package.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,17 @@ jobs:
7272
- os: windows-latest
7373
arch: x86_64
7474
cuda_version:
75-
["11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.1", "12.6.3", "12.8.1"]
75+
["11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.1", "12.6.3", "12.8.1", "12.9.1"]
7676
runs-on: ${{ matrix.os }}
7777
steps:
7878
- uses: actions/checkout@v4
7979
# Windows: We install Cuda on the agent (slow)
80-
- uses: Jimver/[email protected].22
80+
- uses: Jimver/cuda-toolkit@c35baa1a18fd1fc9dcf47c5bd839bf30559c0bc3 # v0.2.24
8181
if: startsWith(matrix.os, 'windows')
8282
id: cuda-toolkit
8383
with:
84-
cuda: ${{ matrix.cuda_version }}
84+
# Temporary: Use CUDA 12.9.0 for Windows until 12.9.1 is supported with this action.
85+
cuda: ${{ matrix.cuda_version == '12.9.1' && '12.9.0' || matrix.cuda_version }}
8586
method: "network"
8687
sub-packages: '["nvcc","cudart","cusparse","cublas","thrust","nvrtc_dev","cublas_dev","cusparse_dev"]'
8788
linux-local-args: '["--toolkit"]'

.github/workflows/tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,23 @@ jobs:
4949
build-cuda:
5050
strategy:
5151
matrix:
52-
cuda_version: ["11.8.0", "12.6.3", "12.8.1"]
53-
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025]
52+
cuda_version: ["11.8.0", "12.6.3", "12.8.1", "12.9.1"]
53+
os: [ubuntu-22.04, ubuntu-22.04-arm]
5454
include:
5555
- os: ubuntu-22.04
5656
arch: x86_64
5757
- os: ubuntu-22.04-arm
5858
arch: aarch64
5959
- os: windows-2025
6060
arch: x86_64
61+
cuda_version: "11.8.0"
6162
runs-on: ${{ matrix.os }}
6263

6364
steps:
6465
- uses: actions/checkout@v4
6566

6667
- name: Install CUDA Toolkit
67-
uses: Jimver/[email protected].23
68+
uses: Jimver/cuda-toolkit@c35baa1a18fd1fc9dcf47c5bd839bf30559c0bc3 # v0.2.24
6869
if: startsWith(matrix.os, 'windows')
6970
id: cuda-toolkit
7071
with:
@@ -358,7 +359,7 @@ jobs:
358359
os: [ubuntu-22.04, windows-2025]
359360
arch: [x86_64]
360361
gpu: [T4, L40S]
361-
cuda_version: ["11.8.0", "12.6.3", "12.8.1"]
362+
cuda_version: ["11.8.0", "12.6.3", "12.8.1", "12.9.1"]
362363
include:
363364
- cuda_version: "11.8.0"
364365
torch_version: "2.2.2"
@@ -369,6 +370,9 @@ jobs:
369370
- cuda_version: "12.8.1"
370371
torch_version: "2.7.1"
371372
pypi_index: "https://download.pytorch.org/whl/cu128"
373+
- cuda_version: "12.9.1"
374+
torch_version: "2.8.0"
375+
pypi_index: "https://download.pytorch.org/whl/nightly/cu129"
372376

373377

374378
# Linux L40S runners
@@ -401,12 +405,14 @@ jobs:
401405
gpu: T4
402406
runner: CUDA-Windows-x64
403407
cuda_version: "11.8.0"
404-
torch_version: "2.7.1"
408+
torch_version: "2.7.1" # Note: this is the last PyTorch release supporting CUDA 11.8.
405409
pypi_index: "https://download.pytorch.org/whl/cu118"
406410

407411
exclude:
408412
# Our current T4 Windows runner has a driver too old (471.11)
409413
# and cannot support CUDA 12+. Skip for now.
414+
- os: windows-2025
415+
cuda_version: "12.9.1"
410416
- os: windows-2025
411417
cuda_version: "12.8.1"
412418
- os: windows-2025
@@ -438,7 +444,7 @@ jobs:
438444

439445
- name: Install dependencies
440446
run: |
441-
pip install torch==${{ matrix.torch_version }} --index-url ${{ matrix.pypi_index }}
447+
pip install --pre torch~=${{ matrix.torch_version }}.dev0 --index-url ${{ matrix.pypi_index }}
442448
pip install -e ".[test]"
443449
pip install pytest-cov
444450

0 commit comments

Comments
 (0)