-
Notifications
You must be signed in to change notification settings - Fork 243
WIP: [NOT READY FOR REVIEW] build wheels with CUDA 13.0.x, test wheels against mix of CTK versions #2270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WIP: [NOT READY FOR REVIEW] build wheels with CUDA 13.0.x, test wheels against mix of CTK versions #2270
Changes from all commits
5ee91d2
641e8be
aa6b5f4
66fca02
ec3e22e
b7db610
122b775
2f40a40
af96977
28b0e2a
fbc982c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # [description] | ||
| # | ||
| # Downloads a CUDA variant of 'torch' from the correct index, based on CUDA major version. | ||
| # | ||
| # This exists to avoid using 'pip --extra-index-url', which could allow for CPU-only 'torch' | ||
| # to be downloaded from pypi.org. | ||
| # | ||
|
|
||
| set -e -u -o pipefail | ||
|
|
||
| TORCH_WHEEL_DIR="${1}" | ||
|
|
||
| # Ensure CUDA-enabled 'torch' packages are always used. | ||
| # | ||
| # Downloading + passing the downloaded file as a requirement forces the use of this | ||
| # package, so we don't accidentally end up with a CPU-only 'torch' from 'pypi.org' | ||
| # (which can happen because pip doesn't support index priority). | ||
| # | ||
| # Not appending this to PIP_CONSTRAINT, because we don't want the torch '--extra-index-url' | ||
| # to leak outside of this script into other 'pip {download,install}'' calls. | ||
| rapids-dependency-file-generator \ | ||
| --output requirements \ | ||
| --file-key "torch_only" \ | ||
| --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};dependencies=${RAPIDS_DEPENDENCIES};require_gpu_pytorch=true" \ | ||
| | tee ./torch-constraints.txt | ||
|
|
||
| rapids-pip-retry download \ | ||
| --isolated \ | ||
| --prefer-binary \ | ||
| --no-deps \ | ||
| -d "${TORCH_WHEEL_DIR}" \ | ||
| --constraint "${PIP_CONSTRAINT}" \ | ||
| --constraint ./torch-constraints.txt \ | ||
| 'torch' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just picking a place on the diff to have a threaded conversation. Here's an interesting one... on the Python 3.14 + CUDA 13.1.1 +
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahhhh there it is. Later $ docker run --rm -it python:3.14 bash
$ pip install pkginfo
$ pip download --no-deps 'numba-cuda==0.26.0'
$ pkginfo --json ./numba_cuda*.whl
...
"requires_dist": [
"numba>=0.60.0",
"cuda-bindings<14.0.0,>=12.9.1",
"cuda-core<1.0.0,>=0.5.1",
"packaging",
"cuda-bindings<13.0.0,>=12.9.1; extra == \"cu12\"",
"cuda-pathfinder<2.0.0,>=1.3.1; extra == \"cu12\"",
"cuda-toolkit[cccl,cudart,nvcc,nvjitlink,nvrtc]==12.*; extra == \"cu12\"",
"cuda-bindings==13.*; extra == \"cu13\"",
"cuda-pathfinder<2.0.0,>=1.3.1; extra == \"cu13\"",
"cuda-toolkit[cccl,cudart,nvjitlink,nvrtc,nvvm]==13.*; extra == \"cu13\""
],
...
$ pip download --no-deps 'numba-cuda==0.24.0'
$ pkginfo --json ./numba_cuda-0.24.0*.tar.gz
...
"requires_dist": [
"numba>=0.60.0",
"cuda-bindings<14.0.0,>=12.9.1",
"cuda-core<1.0.0,>=0.3.2",
"packaging",
"cuda-bindings<13.0.0,>=12.9.1; extra == \"cu12\"",
"cuda-core<1.0.0,>=0.3.0; extra == \"cu12\"",
"cuda-toolkit[cccl,cudart,nvcc,nvjitlink,nvrtc]==12.*; extra == \"cu12\"",
"cuda-bindings==13.*; extra == \"cu13\"",
"cuda-core<1.0.0,>=0.3.2; extra == \"cu13\"",
"cuda-toolkit[cccl,cudart,nvjitlink,nvrtc,nvvm]==13.*; extra == \"cu13\""
],
...Looks like that was added here: NVIDIA/numba-cuda#308 It looks like this wasn't caught on earlier PRs because CI fell back to a CPU-only
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, it goes deeper than this. Just latest pip download \
--no-deps \
--index-url https://download.pytorch.org/whl/cu130 \
'torch==2.10.0+cu130'
pip install \
--prefer-binary \
./torch-*.whl \
'numba-cuda[cu13]>=0.22.1'
# Successfully installed ... cuda-bindings-13.0.3 cuda-core-0.6.0 cuda-pathfinder-1.4.0 cuda-toolkit-13.0.2 ... numba-0.64.0 numba-cuda-0.28.2 ... nvidia-cublas-13.1.0.3 nvidia-cuda-cccl-13.0.85 ... torch-2.10.0+cu130I think the problem looks like this:
What we really want here is a big loud solver error that says "
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright on the latest build, here's what happened. Looking at the most recent CI run (build link) All of these environments look like I'd expect them too and show we're covering a wide range of CTK versions. NOTE: we end up using CTK 12.4 in the arm64 jobs with Regular wheel testswheel-tests / 12.2.2, 3.11, arm64, ubuntu22.04, a100, latest-driver, latest-depsdetails (click me)(link) Looks exactly like what we want... wheel-tests / 12.9.1, 3.11, amd64, ubuntu22.04, l4, latest-driver, oldest-depsdetails (click me)(link) No wheel-tests / 12.9.1, 3.14, amd64, ubuntu24.04, h100, latest-driver, latest-depsdetails (click me)(link) Looks good, everything from CTK 12.9 and latest wheel-tests / 13.0.2, 3.12, amd64, ubuntu24.04, l4, latest-driver, latest-depsdetails (click me)(link) Looks good, latest wheel-tests / 13.0.2, 3.12, arm64, rockylinux8, l4, latest-driver, latest-depsdetails (click me)(link) Looks good, everything from CTK 13.0 and latest wheel-tests / 13.1.1, 3.13, amd64, rockylinux8, rtxpro6000, latest-driver, latest-depsdetails (click me)(link) Looks good, everything from CTK 13.1 and latest wheel-tests / 13.1.1, 3.14, amd64, ubuntu24.04, rtxpro6000, latest-driver, latest-depsdetails (click me)(link) Looks good, everything from CTK 13.1 and latest wheel-tests / 13.1.1, 3.14, arm64, ubuntu24.04, l4, latest-driver, latest-depsdetails (click me)(link) Looks good, everything from CTK 13.1 and latest PyTorch / CuPy testswheel-tests-integration-optional / 12.2.2, 3.11, arm64, ubuntu22.04, a100, latest-driver, latest-depsdetails (click me)(link) As expected, PyTorch skipped because this project doesn't test PyTorch versions old enough to run against CTK 12.2 CuPy tests pulled in latest wheel-tests-integration-optional / 12.9.1, 3.11, amd64, ubuntu22.04, l4, latest-driver, oldest-depsdetails (click me)(link) For PyTorch tests, no CuPy tests downgraded CuPy to 13.6.0 (makes sense, wheel-tests-integration-optional / 12.9.1, 3.14, amd64, ubuntu24.04, h100, latest-driver, latest-depsdetails (click me)For PyTorch tests, CuPy tests kept everything in that environment and just added CuPy wheel-tests-integration-optional / 13.0.2, 3.12, amd64, ubuntu24.04, l4, latest-driver, latest-depsdetails (click me)(link) For PyTorch tests, no CuPy tests kept everything in that environment and just added CuPy wheel-tests-integration-optional / 13.0.2, 3.12, arm64, rockylinux8, l4, latest-driver, latest-depsdetails (click me)(link) PyTorch tests pulled in CuPy tests kept everything in that environment and just added CuPy wheel-tests-integration-optional / 13.1.1, 3.13, amd64, rockylinux8, rtxpro6000, latest-driver, latest-depsdetails (click me)(link) As expected, skipped because there aren't PyTorch wheels support CUDA 13.1 yet. CuPy tests pulled in wheel-tests-integration-optional / 13.1.1, 3.14, amd64, ubuntu24.04, rtxpro6000, latest-driver, latest-depsdetails (click me)(link) As expected, skipped because there aren't PyTorch wheels support CUDA 13.1 yet. CuPy tests pulled in wheel-tests-integration-optional / 13.1.1, 3.14, arm64, ubuntu24.04, l4, latest-driver, latest-depsdetails (click me)(link) As expected, skipped because there aren't PyTorch wheels support CUDA 13.1 yet. CuPy tests pulled in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (updates from testing with nightly matrix) wheel-tests / 12.2.2, 3.11, amd64, ubuntu22.04, v100, earliest-driver, latest-deps(link) Looks exactly like what we want... cuda-toolkit 12.2 (allowed on arm), 12.2 versions of most CTK libraries, nvJitLink 12.9, latest numba-cuda. |
||
Uh oh!
There was an error while loading. Please reload this page.