Skip to content

Commit 41507c5

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix-checkpoint-gpu-uuid-validation
2 parents 1520ee3 + e462bbc commit 41507c5

206 files changed

Lines changed: 16541 additions & 2456 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.

‎.gitattributes‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
* text eol=lf
22
*.cmd text eol=crlf
33

4-
# we do not own any headers checked in, don't touch them
5-
*.h binary
6-
*.hpp binary
7-
# Exception: headers we own
8-
benchmarks/cuda_bindings/benchmarks/cpp/*.hpp -binary text diff
9-
cuda_bindings/cuda/bindings/_bindings/*.h -binary text diff
10-
cuda_bindings/cuda/bindings/_lib/*.h -binary text diff
11-
cuda_core/cuda/core/_cpp/*.h -binary text diff
12-
cuda_core/cuda/core/_cpp/*.hpp -binary text diff
4+
# Keep the vendored DLPack header byte-for-byte, but still show text diffs.
5+
cuda_core/cuda/core/_include/dlpack.h -text !eol diff
136
# git should not convert line endings in PNG files
147
*.png binary
158
*.svg binary

‎.github/actions/fetch_ctk/action.yml‎

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
cuda-components:
1515
description: "A list of the CTK components to install as a comma-separated list. e.g. 'cuda_nvcc,cuda_nvrtc,cuda_cudart'"
1616
required: false
17-
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,cuda_cupti,libnvjitlink,libcufile,libnvfatbin"
17+
default: "cuda_nvcc,cuda_cudart,cuda_crt,libnvvm,cuda_nvrtc,cuda_profiler_api,cuda_cccl,cuda_cupti,libnvjitlink,libcufile,libnvfatbin,libcudla"
1818
cuda-path:
1919
description: "where the CTK components will be installed to, relative to $PWD"
2020
required: false
@@ -27,24 +27,15 @@ runs:
2727
shell: bash --noprofile --norc -xeuo pipefail {0}
2828
run: |
2929
# Pre-process the component list to ensure hash uniqueness
30+
# Use the runtime workspace mount so this also works inside container jobs.
31+
CTK_REDIST_TOOL="${GITHUB_WORKSPACE}/ci/tools/fetch_ctk_redistrib.py"
3032
CTK_CACHE_COMPONENTS=${{ inputs.cuda-components }}
31-
# Conditionally strip out libnvjitlink for CUDA versions < 12
32-
CUDA_MAJOR_VER="$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})"
33-
if [[ "$CUDA_MAJOR_VER" -lt 12 ]]; then
34-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
35-
fi
36-
# Conditionally strip out cuda_crt and libnvvm for CUDA versions < 13
37-
CUDA_MAJOR_VER="$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})"
38-
if [[ "$CUDA_MAJOR_VER" -lt 13 ]]; then
39-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//cuda_crt/}"
40-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvvm/}"
41-
fi
42-
# Conditionally strip out libcufile since it does not support Windows
43-
if [[ "${{ inputs.host-platform }}" == win-* ]]; then
44-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libcufile/}"
45-
fi
46-
# Cleanup stray commas after removing components
47-
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
33+
CTK_JSON_URL="https://developer.download.nvidia.com/compute/cuda/redist/redistrib_${{ inputs.cuda-version }}.json"
34+
CTK_CACHE_COMPONENTS="$(python "$CTK_REDIST_TOOL" filter-components \
35+
--host-platform "${{ inputs.host-platform }}" \
36+
--cuda-version "${{ inputs.cuda-version }}" \
37+
--components "$CTK_CACHE_COMPONENTS" \
38+
--metadata-url "$CTK_JSON_URL")"
4839
4940
HASH=$(echo -n "${CTK_CACHE_COMPONENTS}" | sha256sum | awk '{print $1}')
5041
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH" >> $GITHUB_ENV
@@ -78,19 +69,17 @@ runs:
7869
mkdir $CACHE_TMP_DIR
7970
8071
# The binary archives (redist) are guaranteed to be updated as part of the release posting.
72+
# Use the runtime workspace mount so this also works inside container jobs.
73+
CTK_REDIST_TOOL="${GITHUB_WORKSPACE}/ci/tools/fetch_ctk_redistrib.py"
8174
CTK_BASE_URL="https://developer.download.nvidia.com/compute/cuda/redist/"
8275
CTK_JSON_URL="$CTK_BASE_URL/redistrib_${{ inputs.cuda-version }}.json"
76+
CTK_JSON_FILE="$CACHE_TMP_DIR/redistrib.json"
77+
curl -LSs "$CTK_JSON_URL" -o "$CTK_JSON_FILE"
8378
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
84-
if [[ "${{ inputs.host-platform }}" == "linux-64" ]]; then
85-
CTK_SUBDIR="linux-x86_64"
86-
elif [[ "${{ inputs.host-platform }}" == "linux-aarch64" ]]; then
87-
CTK_SUBDIR="linux-sbsa"
88-
fi
8979
function extract() {
9080
tar -xvf $1 -C $CACHE_TMP_DIR --strip-components=1
9181
}
9282
elif [[ "${{ inputs.host-platform }}" == "win-64" ]]; then
93-
CTK_SUBDIR="windows-x86_64"
9483
function extract() {
9584
_TEMP_DIR_=$(mktemp -d)
9685
unzip $1 -d $_TEMP_DIR_
@@ -106,8 +95,10 @@ runs:
10695
curl -LSs $1 -o $2
10796
}
10897
CTK_COMPONENT=$1
109-
CTK_COMPONENT_REL_PATH="$(curl -s $CTK_JSON_URL |
110-
python -c "import sys, json; print(json.load(sys.stdin)['${CTK_COMPONENT}']['${CTK_SUBDIR}']['relative_path'])")"
98+
CTK_COMPONENT_REL_PATH="$(python "$CTK_REDIST_TOOL" component-relative-path \
99+
--host-platform "${{ inputs.host-platform }}" \
100+
--component "$CTK_COMPONENT" \
101+
--metadata-path "$CTK_JSON_FILE")"
111102
CTK_COMPONENT_URL="${CTK_BASE_URL}/${CTK_COMPONENT_REL_PATH}"
112103
CTK_COMPONENT_COMPONENT_FILENAME="$(basename $CTK_COMPONENT_REL_PATH)"
113104
download $CTK_COMPONENT_URL $CTK_COMPONENT_COMPONENT_FILENAME

‎.github/actions/sccache-summary/action.yml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ name: sccache summary
66
description: Parse sccache stats JSON and write a summary table to GITHUB_STEP_SUMMARY
77

88
# Inspired by NVIDIA/cccl's prepare-execution-summary.py (PR #3621).
9-
# Only counts C/C++ and CUDA language hits (excludes PTX/CUBIN which are
10-
# not included in sccache's compile_requests counter).
119

1210
inputs:
1311
json-file:
@@ -47,10 +45,11 @@ runs:
4745
with open(json_file) as f:
4846
stats = json.load(f)["stats"]
4947
50-
# compile_requests includes non-compilation calls (linker, etc).
51-
# Use cache_hits + cache_misses as the denominator to match sccache's
52-
# own "Cache hits rate" which only counts actual compilation requests.
53-
counted_languages = {"C/C++", "CUDA"}
48+
# compile_requests only counts top-level nvcc invocations, but each
49+
# invocation spawns sub-tool compilations (cudafe++, cicc, ptxas) that
50+
# sccache tracks under separate language keys. Count all of them so
51+
# the reported rate matches sccache's own "Cache hits rate".
52+
counted_languages = {"C/C++", "CUDA", "CUDA (Device code)", "PTX", "CUBIN"}
5453
hits = sum(
5554
v for k, v in stats.get("cache_hits", {}).get("counts", {}).items()
5655
if k in counted_languages

‎.github/workflows/backport.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
}}
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3838

3939
- name: Load branch name
4040
id: get-branch
@@ -43,7 +43,7 @@ jobs:
4343
echo "OLD_BRANCH=${OLD_BRANCH}" >> $GITHUB_ENV
4444
4545
- name: Create backport pull requests
46-
uses: korthout/backport-action@7c3f6cd5843cac11bc59a04a1b7699af93261670 # v4.5.0
46+
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
4747
with:
4848
copy_assignees: true
4949
copy_labels_pattern: true
@@ -54,7 +54,7 @@ jobs:
5454
if: github.repository_owner == 'nvidia' && github.event_name == 'workflow_dispatch'
5555
runs-on: ubuntu-latest
5656
steps:
57-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5858

5959
- name: Load branch from environment name
6060
if: inputs.backport-branch == null
@@ -67,7 +67,7 @@ jobs:
6767
run: echo "BACKPORT_BRANCH=${{ inputs.backport-branch }}" >> $GITHUB_ENV
6868

6969
- name: Create backport pull requests
70-
uses: korthout/backport-action@7c3f6cd5843cac11bc59a04a1b7699af93261670 # v4.5.0
70+
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
7171
with:
7272
copy_assignees: true
7373
copy_labels_pattern: true

‎.github/workflows/bandit.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

@@ -8,6 +8,7 @@ on:
88
push:
99
branches:
1010
- "pull-request/[0-9]+"
11+
- "ctk-next"
1112
- "main"
1213
concurrency:
1314
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
@@ -17,10 +18,12 @@ jobs:
1718
analyze:
1819
runs-on: ubuntu-latest
1920
permissions:
21+
actions: read
22+
contents: read
2023
security-events: write
2124
steps:
2225
- name: Checkout
23-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2427

2528
- name: Install uv
2629
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
@@ -42,6 +45,6 @@ jobs:
4245
with:
4346
args: "check --select S --ignore ${{ steps.ignore-codes.outputs.codes }} --output-format sarif --output-file results.sarif"
4447
- name: Upload SARIF file
45-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
48+
uses: github/codeql-action/upload-sarif@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
4649
with:
4750
sarif_file: results.sarif

‎.github/workflows/build-docs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
shell: bash -el {0}
4646
steps:
4747
- name: Checkout ${{ github.event.repository.name }}
48-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4949
with:
50-
fetch-depth: 0
50+
fetch-depth: 1
5151
ref: ${{ inputs.git-tag }}
5252

5353
- name: Read build CTK version

‎.github/workflows/build-wheel.yml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ jobs:
4040
(inputs.host-platform == 'win-64' && 'windows-2022') }}
4141
steps:
4242
- name: Checkout ${{ github.event.repository.name }}
43-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4444
with:
45+
# Treeless clone: setuptools-scm needs the commit graph (`git describe`)
46+
# but not historical blobs.
4547
fetch-depth: 0
48+
filter: blob:none
4649

4750
- name: Install latest rapidsai/sccache
4851
if: ${{ startsWith(inputs.host-platform, 'linux') }}
@@ -401,11 +404,7 @@ jobs:
401404
402405
OLD_BRANCH=$(yq '.backport_branch' ci/versions.yml)
403406
OLD_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*"
404-
LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "ci.yml" -s success -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId')
405-
if [[ "$LATEST_PRIOR_RUN_ID" == "" ]]; then
406-
echo "LATEST_PRIOR_RUN_ID not found!"
407-
exit 1
408-
fi
407+
LATEST_PRIOR_RUN_ID=$(./ci/tools/lookup-run-id --branch "${OLD_BRANCH}" NVIDIA/cuda-python "CI")
409408
410409
gh run download $LATEST_PRIOR_RUN_ID -p ${OLD_BASENAME} -R NVIDIA/cuda-python
411410
rm -rf ${OLD_BASENAME}-tests # exclude cython test artifacts

0 commit comments

Comments
 (0)