Skip to content

Commit 6cfe782

Browse files
authored
ci: Fixes for cuda13 (#802)
* ci: Bump runner Signed-off-by: oliver könig <[email protected]> * check for ngc wheels Signed-off-by: oliver könig <[email protected]> * fix Signed-off-by: oliver könig <[email protected]> * fixes Signed-off-by: oliver könig <[email protected]> * fix Signed-off-by: oliver könig <[email protected]> * ci: Fix for cuda13 Signed-off-by: oliver könig <[email protected]> * remove old versions Signed-off-by: oliver könig <[email protected]> * PIP_CONSTRAINT Signed-off-by: oliver könig <[email protected]> --------- Signed-off-by: oliver könig <[email protected]>
1 parent 4f77d53 commit 6cfe782

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

.github/workflows/_build_in_container.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939
root-reserve-mb: 5120
4040
temp-reserve-mb: 32
4141
swap-size-mb: 10240
42-
remove-dotnet: 'true'
43-
remove-android: 'true'
44-
remove-haskell: 'true'
45-
remove-codeql: 'true'
46-
build-mount-path: '/var/lib/docker/'
42+
remove-dotnet: "true"
43+
remove-android: "true"
44+
remove-haskell: "true"
45+
remove-codeql: "true"
46+
build-mount-path: "/var/lib/docker/"
4747

4848
- name: Restore /var/lib/docker/
4949
run: sudo sh -c "mv ${GITHUB_WORKSPACE}/docker/* /var/lib/docker"
@@ -63,9 +63,9 @@ jobs:
6363
run: |
6464
echo "Free space:"
6565
df -h
66-
66+
6767
- name: Pull the container
68-
run: docker pull ${{ inputs.container-image }}
68+
run: docker pull ${{ inputs.container-image }}
6969

7070
- name: Set CUDA and PyTorch versions
7171
run: |
@@ -94,7 +94,7 @@ jobs:
9494
9595
- name: Build wheel
9696
id: build_wheel
97-
env:
97+
env:
9898
CXX11_ABI: ${{ env.CXX11_ABI }}
9999
MATRIX_TORCH_VERSION: ${{ env.MATRIX_TORCH_VERSION}}
100100
WHEEL_CUDA_VERSION: ${{ env.WHEEL_CUDA_VERSION }}
@@ -106,6 +106,7 @@ jobs:
106106
--workdir /workspace \
107107
--volume $(pwd):/workspace \
108108
--volume $GITHUB_ENV:$GITHUB_ENV \
109+
-e PIP_CONSTRAINT= \
109110
-e GITHUB_ENV=$GITHUB_ENV \
110111
-e CXX11_ABI=$CXX11_ABI \
111112
-e MATRIX_TORCH_VERSION=$MATRIX_TORCH_VERSION \

.github/workflows/publish.yaml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,21 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
# Using ubuntu-20.04 instead of 22.04 for more compatibility (glibc). Ideally we'd use the
43+
# Using ubuntu-22.04 instead of 24.04 for more compatibility (glibc). Ideally we'd use the
4444
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
4545
os: [ubuntu-22.04]
4646
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
47-
torch-version: ["2.1.2", "2.2.2", "2.3.1", "2.4.0", "2.5.1", "2.6.0.dev20241001"]
48-
cuda-version: ["11.8.0", "12.3.2"]
47+
torch-version: ["2.4.0", "2.5.1", "2.6.0", "2.7.1"]
48+
cuda-version: ["11.8.0", "12.9.1"]
4949
# We need separate wheels that either uses C++11 ABI (-D_GLIBCXX_USE_CXX11_ABI) or not.
5050
# Pytorch wheels currently don't use it, but nvcr images have Pytorch compiled with C++11 ABI.
5151
# Without this we get import error (undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs)
5252
# when building without C++11 ABI and using it on nvcr images.
5353
cxx11_abi: ["FALSE", "TRUE"]
5454
exclude:
5555
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
56-
# Pytorch < 2.2 does not support Python 3.12
57-
- torch-version: "2.1.2"
58-
python-version: "3.12"
59-
# Pytorch < 2.5 does not support Python 3.13
60-
- torch-version: "2.1.2"
61-
python-version: "3.13"
62-
- torch-version: "2.2.2"
63-
python-version: "3.13"
64-
- torch-version: "2.3.1"
65-
python-version: "3.13"
6656
- torch-version: "2.4.0"
6757
python-version: "3.13"
68-
6958
uses: ./.github/workflows/_build.yml
7059
with:
7160
runs-on: ${{ matrix.os }}

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,15 @@ def get_wheel_url():
293293
torch_cuda_version = parse(torch.version.cuda)
294294
# For CUDA 11, we only compile for CUDA 11.8, and for CUDA 12 we only compile for CUDA 12.3
295295
# to save CI time. Minor versions should be compatible.
296-
torch_cuda_version = parse("11.8") if torch_cuda_version.major == 11 else parse("12.3")
296+
if torch_cuda_version.major == 11:
297+
torch_cuda_version = parse("11.8")
298+
elif torch_cuda_version.major == 12:
299+
torch_cuda_version = parse("12.3")
300+
elif torch_cuda_version.major == 13:
301+
torch_cuda_version = parse("13.0")
302+
else:
303+
raise ValueError(f"CUDA version {torch_cuda_version} not supported")
304+
297305
cuda_version = f"{torch_cuda_version.major}"
298306

299307
gpu_compute_version = hip_ver if HIP_BUILD else cuda_version

0 commit comments

Comments
 (0)