Skip to content

Commit 4145b5c

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 (cherry picked from commit 1abd5e7)
1 parent d09527c commit 4145b5c

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/cuda-toolkit@v0.2.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/cuda-toolkit@v0.2.23
68+
uses: Jimver/cuda-toolkit@c35baa1a18fd1fc9dcf47c5bd839bf30559c0bc3 # v0.2.24
6869
if: startsWith(matrix.os, 'windows')
6970
id: cuda-toolkit
7071
with:
@@ -193,7 +194,7 @@ jobs:
193194
os: [ubuntu-22.04, windows-2025]
194195
arch: [x86_64]
195196
gpu: [T4, L40S]
196-
cuda_version: ["11.8.0", "12.6.3", "12.8.1"]
197+
cuda_version: ["11.8.0", "12.6.3", "12.8.1", "12.9.1"]
197198
include:
198199
- cuda_version: "11.8.0"
199200
torch_version: "2.2.2"
@@ -204,6 +205,9 @@ jobs:
204205
- cuda_version: "12.8.1"
205206
torch_version: "2.7.0"
206207
pypi_index: "https://download.pytorch.org/whl/cu128"
208+
- cuda_version: "12.9.1"
209+
torch_version: "2.8.0"
210+
pypi_index: "https://download.pytorch.org/whl/nightly/cu129"
207211

208212

209213
# Linux L40S runners
@@ -236,12 +240,14 @@ jobs:
236240
gpu: T4
237241
runner: CUDA-Windows-x64
238242
cuda_version: "11.8.0"
239-
torch_version: "2.7.0"
243+
torch_version: "2.7.1" # Note: this is the last PyTorch release supporting CUDA 11.8.
240244
pypi_index: "https://download.pytorch.org/whl/cu118"
241245

242246
exclude:
243247
# Our current T4 Windows runner has a driver too old (471.11)
244248
# and cannot support CUDA 12+. Skip for now.
249+
- os: windows-2025
250+
cuda_version: "12.9.1"
245251
- os: windows-2025
246252
cuda_version: "12.8.1"
247253
- os: windows-2025
@@ -273,7 +279,7 @@ jobs:
273279

274280
- name: Install dependencies
275281
run: |
276-
pip install torch==${{ matrix.torch_version }} --index-url ${{ matrix.pypi_index }}
282+
pip install --pre torch~=${{ matrix.torch_version }}.dev0 --index-url ${{ matrix.pypi_index }}
277283
pip install -e ".[test]"
278284
pip install pytest-cov
279285

0 commit comments

Comments
 (0)