Skip to content

Commit b9b3c87

Browse files
authored
Merge branch 'main' into faster_set_current
2 parents 92d24ce + 382f49b commit b9b3c87

123 files changed

Lines changed: 6540 additions & 7102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/BACKPORT_BRANCH

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.8.x
1+
12.9.x

.github/actions/fetch_ctk/action.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
description: "A list of the CTK components to install as a comma-separated list. e.g. 'cuda_nvcc,cuda_nvrtc,cuda_cudart'"
1818
required: false
1919
type: string
20-
default: "cuda_nvcc,cuda_cudart,cuda_nvrtc,cuda_profiler_api,cuda_cccl,libnvjitlink,libcufile"
20+
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,libnvjitlink,libcufile"
2121

2222
runs:
2323
using: composite
@@ -32,15 +32,16 @@ runs:
3232
if [[ "$CUDA_MAJOR_VER" -lt 12 ]]; then
3333
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
3434
fi
35+
# Conditionally strip out cuda_crt and libnvvm for CUDA versions < 13
36+
CUDA_MAJOR_VER="$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})"
37+
if [[ "$CUDA_MAJOR_VER" -lt 13 ]]; then
38+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//cuda_crt/}"
39+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvvm/}"
40+
fi
3541
# Conditionally strip out libcufile since it does not support Windows
3642
if [[ "${{ inputs.host-platform }}" == win-* ]]; then
3743
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libcufile/}"
3844
fi
39-
# Conditionally strip out libcufile for CUDA versions < 12.2.0 + aarch64 (redist not available)
40-
CUDA_MINOR_VER="$(cut -d '.' -f 2 <<< ${{ inputs.cuda-version }})"
41-
if [[ ("$CUDA_MAJOR_VER" -lt 12 || "$CUDA_MINOR_VER" -lt 2) && "${{ inputs.host-platform }}" == "linux-aarch64" ]]; then
42-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libcufile/}"
43-
fi
4445
# Cleanup stray commas after removing components
4546
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
4647

.github/workflows/build-wheel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
if-no-files-found: error
108108

109109
- name: Build cuda.core wheel
110-
uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1
110+
uses: pypa/cibuildwheel@e6de07ed3921b51089aae6981989889cf1eddd0c # v3.1.1
111111
env:
112112
CIBW_BUILD: ${{ env.CIBW_BUILD }}
113113
CIBW_ARCHS_LINUX: "native"
@@ -149,7 +149,7 @@ jobs:
149149
cuda-version: ${{ inputs.cuda-version }}
150150

151151
- name: Build cuda.bindings wheel
152-
uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1
152+
uses: pypa/cibuildwheel@e6de07ed3921b51089aae6981989889cf1eddd0c # v3.1.1
153153
env:
154154
CIBW_BUILD: ${{ env.CIBW_BUILD }}
155155
CIBW_ARCHS_LINUX: "native"

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
34+
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
3535
with:
3636
languages: ${{ matrix.language }}
3737
build-mode: ${{ matrix.build-mode }}
3838
queries: security-extended
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
41+
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
4242
with:
4343
category: "/language:${{matrix.language}}"

.github/workflows/guess_latest.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,27 @@
66
# URL to search
77
URL="https://developer.download.nvidia.com/compute/cuda/redist/"
88

9+
# Ensure exactly one argument is provided
10+
if [ "$#" -ne 1 ]; then
11+
echo "Usage: $0 <CUDA_major_version>"
12+
exit 1
13+
fi
14+
15+
# Accept major version as the first argument
16+
MAJOR_VERSION="$1"
17+
918
# Fetch the directory listing and extract the latest version number
1019
get_latest_version() {
1120
# Get the HTML content of the page
1221
local html_content=$(wget -q -O - "$URL")
1322

1423
# Extract links matching the pattern redistrib_?.?.?.json
15-
local files=$(echo "$html_content" | grep -oP 'redistrib_[0-9]+\.[0-9]+\.[0-9]+\.json' | cut -d'"' -f2)
24+
local files=$(echo "$html_content" | grep -oP "redistrib_${MAJOR_VERSION}\.[0-9]+\.[0-9]+\.json" | cut -d'"' -f2)
1625

1726
# If files were found, extract the version numbers and find the latest
1827
if [ -n "$files" ]; then
1928
# Extract just the version numbers using regex
20-
local versions=$(echo "$files" | grep -oP 'redistrib_\K[0-9]+\.[0-9]+\.[0-9]+(?=\.json)')
29+
local versions=$(echo "$files" | grep -oP "redistrib_\K${MAJOR_VERSION}\.[0-9]+\.[0-9]+(?=\.json)")
2130

2231
# Sort the versions and get the latest
2332
local latest_version=$(echo "$versions" | sort -V | tail -n 1)

.github/workflows/install_gpu_driver.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
function Install-Driver {
77

88
# Set the correct URL, filename, and arguments to the installer
9-
# This driver is picked to support Windows 11 & CUDA 12.8
10-
$url = 'https://us.download.nvidia.com/tesla/572.13/572.13-data-center-tesla-desktop-win10-win11-64bit-dch-international.exe';
11-
$file_dir = 'C:\NVIDIA-Driver\572.13-data-center-tesla-desktop-win10-win11-64bit-dch-international.exe';
9+
# This driver is picked to support Windows 11 & CUDA 13.0
10+
$url = 'https://us.download.nvidia.com/tesla/580.88/580.88-data-center-tesla-desktop-win10-win11-64bit-dch-international.exe';
11+
$file_dir = 'C:\NVIDIA-Driver\580.88-data-center-tesla-desktop-win10-win11-64bit-dch-international.exe';
1212
$install_args = '/s /noeula /noreboot';
1313

1414
# Create the folder for the driver download

.github/workflows/test-wheel-linux.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
# Add a special entry for the H100 runner on amd64.
5252
special_runner=""
5353
if [[ "${ARCH}" == "amd64" ]]; then
54-
special_runner="- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: 'H100', DRIVER: 'latest' }"
54+
special_runner="- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: 'H100', DRIVER: 'latest' }"
5555
fi
5656
5757
# Please keep the matrices sorted in ascending order by the following:
@@ -62,18 +62,16 @@ jobs:
6262
#
6363
export MATRICES="
6464
pull-request:
65-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
66-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
6765
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
68-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'earliest' }
66+
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
6967
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
70-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
68+
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '13.0.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
7169
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
72-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'earliest' }
70+
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
7371
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
74-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
75-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
72+
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '13.0.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
7673
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
74+
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
7775
${special_runner}
7876
nightly:
7977
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
@@ -200,13 +198,14 @@ jobs:
200198
201199
OLD_BRANCH=$(cat .github/BACKPORT_BRANCH)
202200
OLD_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*"
203-
LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "build-and-test.yml" -s completed -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId')
201+
LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "ci.yml" -s completed -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId')
204202
if [[ "$LATEST_PRIOR_RUN_ID" == "" ]]; then
205203
echo "LATEST_PRIOR_RUN_ID not found!"
206204
exit 1
207205
fi
208206
209207
gh run download $LATEST_PRIOR_RUN_ID -p ${OLD_BASENAME} -R NVIDIA/cuda-python
208+
rm -rf ${OLD_BASENAME}-tests # exclude cython test artifacts
210209
ls -al $OLD_BASENAME
211210
mkdir -p "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"
212211
mv $OLD_BASENAME/*.whl "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"/
@@ -318,16 +317,16 @@ jobs:
318317
pip install $(ls cuda_python*.whl)[all]
319318
fi
320319
321-
- name: Install cuda.pathfinder nvidia_wheels_cu12
322-
if: startsWith(matrix.CUDA_VER, '12.')
320+
- name: Install cuda.pathfinder nvidia_wheels_cu13
321+
if: startsWith(matrix.CUDA_VER, '13.')
323322
run: |
324323
pushd cuda_pathfinder
325-
pip install -v .[nvidia_wheels_cu12]
324+
pip install -v .[nvidia_wheels_cu13]
326325
pip freeze
327326
popd
328327
329328
- name: Run cuda.pathfinder tests with all_must_work
330-
if: startsWith(matrix.CUDA_VER, '12.')
329+
if: startsWith(matrix.CUDA_VER, '13.')
331330
env:
332331
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: all_must_work
333332
run: run-tests pathfinder

.github/workflows/test-wheel-windows.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
#
4848
export MATRICES="
4949
pull-request:
50-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '11.8.0', LOCAL_CTK: '0' }
51-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '11.8.0', LOCAL_CTK: '1' }
5250
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '0' }
5351
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1' }
52+
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '13.0.0', LOCAL_CTK: '0' }
53+
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '13.0.0', LOCAL_CTK: '1' }
5454
nightly:
5555
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '11.8.0', LOCAL_CTK: '0' }
5656
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '11.8.0', LOCAL_CTK: '1' }
@@ -178,14 +178,15 @@ jobs:
178178
run: |
179179
$OLD_BRANCH = Get-Content .github/BACKPORT_BRANCH
180180
$OLD_BASENAME = "cuda-bindings-python${env:PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*"
181-
$runData = gh run list -b $OLD_BRANCH -L 1 -w "build-and-test.yml" -s completed -R NVIDIA/cuda-python --json databaseId | ConvertFrom-Json
181+
$runData = gh run list -b $OLD_BRANCH -L 1 -w "ci.yml" -s completed -R NVIDIA/cuda-python --json databaseId | ConvertFrom-Json
182182
if (-not $runData -or $runData.Length -eq 0 -or -not $runData[0].databaseId -or [string]::IsNullOrEmpty($runData[0].databaseId)) {
183183
Write-Host "LATEST_PRIOR_RUN_ID not found!"
184184
exit 1
185185
}
186186
$LATEST_PRIOR_RUN_ID = $runData[0].databaseId
187187
188188
gh run download $LATEST_PRIOR_RUN_ID -p $OLD_BASENAME -R NVIDIA/cuda-python
189+
Remove-Item -Recurse -Force "${OLD_BASENAME}-tests" # exclude cython test artifacts
189190
Get-ChildItem -Path $OLD_BASENAME
190191
New-Item -Path "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}" -ItemType Directory -Force
191192
Move-Item -Path "$OLD_BASENAME/*.whl" -Destination "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"
@@ -285,17 +286,17 @@ jobs:
285286
pip install "$((Get-ChildItem -Filter cuda_python*.whl).FullName)[all]"
286287
}
287288
288-
- name: Install cuda.pathfinder nvidia_wheels_cu12
289-
if: startsWith(matrix.CUDA_VER, '12.')
289+
- name: Install cuda.pathfinder nvidia_wheels_cu13
290+
if: startsWith(matrix.CUDA_VER, '13.')
290291
shell: bash --noprofile --norc -xeuo pipefail {0}
291292
run: |
292293
pushd cuda_pathfinder
293-
pip install -v .[nvidia_wheels_cu12]
294+
pip install -v .[nvidia_wheels_cu13]
294295
pip freeze
295296
popd
296297
297298
- name: Run cuda.pathfinder tests with all_must_work
298-
if: startsWith(matrix.CUDA_VER, '12.')
299+
if: startsWith(matrix.CUDA_VER, '13.')
299300
env:
300301
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: all_must_work
301302
shell: bash --noprofile --norc -xeuo pipefail {0}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ The list of available interfaces is:
3838
* NVRTC
3939
* nvJitLink
4040
* NVVM
41+
* cuFile

ci/tools/env-vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ elif [[ "${1}" == "test" ]]; then
6060
# We only test compute-sanitizer on python 3.12 arbitrarily; we don't need to use sanitizer on the entire matrix
6161
# Only local ctk installs have compute-sanitizer; there is no wheel for it
6262
if [[ "${PY_VER}" == "3.12" && "${CUDA_VER}" != "11.8.0" && "${LOCAL_CTK}" == 1 && "${HOST_PLATFORM}" == linux* ]]; then
63-
echo "LATEST_CUDA_VERSION=$(bash .github/workflows/guess_latest.sh)" >> $GITHUB_ENV
63+
echo "LATEST_CUDA_VERSION=$(bash .github/workflows/guess_latest.sh $TEST_CUDA_MAJOR)" >> $GITHUB_ENV
6464
SETUP_SANITIZER=1
6565
else
6666
SETUP_SANITIZER=0

0 commit comments

Comments
 (0)