Skip to content

Commit 1878c2d

Browse files
authored
Merge branch 'main' into kernel-attributes-ref-fix
2 parents 17e4bc5 + 0e72a17 commit 1878c2d

File tree

97 files changed

+3050
-1457
lines changed

Some content is hidden

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

97 files changed

+3050
-1457
lines changed

.github/actions/doc_preview/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ runs:
4141
:---:
4242
| <p></p> :rocket: View preview at <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/ <br>
4343
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-core/ <br>
44-
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-bindings/ <br><br>
44+
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-bindings/ <br>
45+
| <br> https://nvidia.github.io/cuda-python/pr-preview/pr-${{ inputs.pr-number }}/cuda-pathfinder/ <br><br>
4546
| <h6><br> Preview will be ready when the GitHub Pages deployment is complete. <br><br></h6>
4647
4748
# The steps below are executed only when building on main.

.github/dependabot.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,15 @@ updates:
77
- package-ecosystem: github-actions
88
directory: /
99
schedule:
10-
interval: weekly
10+
interval: "monthly"
11+
time: "09:00"
12+
timezone: "America/Los_Angeles"
13+
14+
# Keep churn down: only one open PR from this ecosystem at a time
15+
open-pull-requests-limit: 1
16+
17+
groups:
18+
actions-monthly:
19+
applies-to: version-updates
20+
patterns: ["*"]
21+
update-types: ["minor", "patch"]

.github/workflows/bandit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ jobs:
2020
security-events: write
2121
steps:
2222
- name: Perform Bandit Analysis
23-
uses: PyCQA/bandit-action@67a458d90fa11fb1463e91e7f4c8f068b5863c7f # v1.0.1
23+
# KEEP IN SYNC WITH bandit rev in .pre-commit-config.yaml
24+
# Current runner uses Python 3.8, so the action installs bandit==1.7.10
25+
# via `pip install bandit[sarif]`. If runner Python moves to >=3.9,
26+
# the action will resolve to 1.8.x and you'll need to bump pre-commit.
27+
# (Bandit >=1.8.0 dropped Python 3.8 via Requires-Python metadata.)
28+
uses: PyCQA/bandit-action@8a1b30610f61f3f792fe7556e888c9d7dffa52de # v1.0.0

.github/workflows/build-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
# - cuda-core
2020
# - cuda-bindings
2121
# - cuda-python
22+
# - cuda-pathfinder
2223
# - all
2324
git-tag:
2425
description: "Target git tag to build docs for"

.github/workflows/build-wheel.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Check cuda.pathfinder wheel
9797
if: ${{ strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
9898
run: |
99-
twine check cuda_pathfinder/*.whl
99+
twine check --strict cuda_pathfinder/*.whl
100100
101101
- name: Upload cuda.pathfinder build artifacts
102102
if: ${{ strategy.job-index == 0 && inputs.host-platform == 'linux-64' }}
@@ -132,7 +132,7 @@ jobs:
132132
133133
- name: Check cuda.core wheel
134134
run: |
135-
twine check ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
135+
twine check --strict ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl
136136
137137
- name: Upload cuda.core build artifacts
138138
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -179,7 +179,7 @@ jobs:
179179
180180
- name: Check cuda.bindings wheel
181181
run: |
182-
twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
182+
twine check --strict ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl
183183
184184
- name: Upload cuda.bindings build artifacts
185185
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -194,7 +194,7 @@ jobs:
194194
run: |
195195
pushd cuda_python
196196
pip wheel -v --no-deps .
197-
twine check *.whl
197+
twine check --strict *.whl
198198
popd
199199
200200
- name: List the cuda-python artifacts directory

.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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
34+
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
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@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
41+
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
4242
with:
4343
category: "/language:${{matrix.language}}"

.github/workflows/release.yml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ on:
2424
required: true
2525
type: string
2626
run-id:
27-
description: "The GHA run ID that generated validated artifacts"
28-
required: true
27+
description: "The GHA run ID that generated validated artifacts (optional - will be auto-detected from git tag if not provided)"
28+
required: false
2929
type: string
30+
default: ""
3031
build-ctk-ver:
3132
type: string
3233
required: true
@@ -43,6 +44,32 @@ defaults:
4344
shell: bash --noprofile --norc -xeuo pipefail {0}
4445

4546
jobs:
47+
determine-run-id:
48+
runs-on: ubuntu-latest
49+
outputs:
50+
run-id: ${{ steps.lookup-run-id.outputs.run-id }}
51+
steps:
52+
- name: Checkout Source
53+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
54+
with:
55+
# fetch-depth: 0 is required so the lookup-run-id script can access all git tags
56+
fetch-depth: 0
57+
58+
- name: Determine Run ID
59+
id: lookup-run-id
60+
env:
61+
GH_TOKEN: ${{ github.token }}
62+
run: |
63+
if [[ -n "${{ inputs.run-id }}" ]]; then
64+
echo "Using provided run ID: ${{ inputs.run-id }}"
65+
echo "run-id=${{ inputs.run-id }}" >> $GITHUB_OUTPUT
66+
else
67+
echo "Auto-detecting run ID for tag: ${{ inputs.git-tag }}"
68+
RUN_ID=$(./ci/tools/lookup-run-id "${{ inputs.git-tag }}" "${{ github.repository }}")
69+
echo "Auto-detected run ID: $RUN_ID"
70+
echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT
71+
fi
72+
4673
check-tag:
4774
runs-on: ubuntu-latest
4875
steps:
@@ -91,13 +118,14 @@ jobs:
91118
pull-requests: write
92119
needs:
93120
- check-tag
121+
- determine-run-id
94122
secrets: inherit
95123
uses: ./.github/workflows/build-docs.yml
96124
with:
97125
build-ctk-ver: ${{ inputs.build-ctk-ver }}
98126
component: ${{ inputs.component }}
99127
git-tag: ${{ inputs.git-tag }}
100-
run-id: ${{ inputs.run-id }}
128+
run-id: ${{ needs.determine-run-id.outputs.run-id }}
101129
is-release: true
102130

103131
upload-archive:
@@ -106,18 +134,20 @@ jobs:
106134
contents: write
107135
needs:
108136
- check-tag
137+
- determine-run-id
109138
secrets: inherit
110139
uses: ./.github/workflows/release-upload.yml
111140
with:
112141
git-tag: ${{ inputs.git-tag }}
113-
run-id: ${{ inputs.run-id }}
142+
run-id: ${{ needs.determine-run-id.outputs.run-id }}
114143
component: ${{ inputs.component }}
115144

116145
publish-wheels:
117146
name: Publish wheels
118147
runs-on: ubuntu-latest
119148
needs:
120149
- check-tag
150+
- determine-run-id
121151
environment:
122152
name: ${{ inputs.wheel-dst }}
123153
url: https://${{ (inputs.wheel-dst == 'testpypi' && 'test.') || '' }}pypi.org/p/${{ inputs.component }}/
@@ -131,7 +161,7 @@ jobs:
131161
env:
132162
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133163
run: |
134-
./ci/tools/download-wheels "${{ inputs.run-id }}" "${{ inputs.component }}" "${{ github.repository }}" "dist"
164+
./ci/tools/download-wheels "${{ needs.determine-run-id.outputs.run-id }}" "${{ inputs.component }}" "${{ github.repository }}" "dist"
135165
136166
- name: Publish package distributions to PyPI
137167
if: ${{ inputs.wheel-dst == 'pypi' }}

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

Lines changed: 27 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -34,86 +34,43 @@ jobs:
3434
outputs:
3535
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
3636
steps:
37+
- name: Checkout ${{ github.event.repository.name }}
38+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
39+
with:
40+
fetch-depth: 1
41+
3742
- name: Validate Test Type
3843
run: |
3944
if [[ "$BUILD_TYPE" != "pull-request" ]] && [[ "$BUILD_TYPE" != "nightly" ]] && [[ "$BUILD_TYPE" != "branch" ]]; then
4045
echo "Invalid build type! Must be one of 'nightly', 'pull-request', or 'branch'."
4146
exit 1
4247
fi
48+
4349
- name: Compute Python Test Matrix
4450
id: compute-matrix
4551
run: |
46-
# Set a default GPU based upon architecture.
47-
gpu="l4"
48-
if [[ "${ARCH}" == "arm64" ]]; then
49-
gpu="a100"
50-
fi
51-
# Add a special entry for the H100 runner on amd64.
52-
special_runner=""
53-
if [[ "${ARCH}" == "amd64" ]]; then
54-
special_runner="- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: 'H100', DRIVER: 'latest' }"
55-
fi
56-
57-
# Please keep the matrices sorted in ascending order by the following:
58-
#
59-
# [PY_VER, CUDA_VER, LOCAL_CTK, GPU, DRIVER]
60-
#
61-
# Note that DRIVER: `earliest` does not work with CUDA 12.9.0 and LOCAL_CTK: 0 does not work with CUDA 12.0.1.
62-
#
63-
export MATRICES="
64-
pull-request:
65-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
66-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
67-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.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' }
69-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
70-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '13.0.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
71-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', 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' }
73-
- { 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' }
75-
${special_runner}
76-
nightly:
77-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
78-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
79-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
80-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
81-
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
82-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
83-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
84-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
85-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
86-
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
87-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
88-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
89-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
90-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
91-
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
92-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
93-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
94-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
95-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
96-
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
97-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '11.8.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'earliest' }
98-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '11.8.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
99-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
100-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
101-
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
102-
${special_runner}
103-
"
104-
10552
# Use the nightly matrix for branch tests
10653
MATRIX_TYPE="${BUILD_TYPE}"
10754
if [[ "${MATRIX_TYPE}" == "branch" ]]; then
10855
MATRIX_TYPE="nightly"
10956
fi
110-
export MATRIX_TYPE
111-
TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(MATRIX_TYPE)]')
112-
export TEST_MATRIX
57+
58+
# Read base matrix from JSON file for the specific architecture
59+
TEST_MATRIX=$(jq --arg arch "$ARCH" --arg matrix_type "$MATRIX_TYPE" '
60+
.linux[$matrix_type] |
61+
map(select(.ARCH == $arch))
62+
' ci/test-matrix.json)
63+
64+
# Add special runner for amd64 if applicable
65+
if [[ "${ARCH}" == "amd64" ]]; then
66+
SPECIAL_RUNNERS=$(jq '
67+
.linux.special_runners.amd64
68+
' ci/test-matrix.json)
69+
TEST_MATRIX=$(jq --argjson special "$SPECIAL_RUNNERS" '. + $special' <<< "$TEST_MATRIX")
70+
fi
11371
11472
MATRIX="$(
115-
yq -n -o json 'env(TEST_MATRIX)' | \
116-
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end'
73+
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end' <<< "$TEST_MATRIX"
11774
)"
11875
11976
echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
@@ -298,6 +255,7 @@ jobs:
298255
- name: Run cuda.pathfinder tests with see_what_works
299256
env:
300257
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: see_what_works
258+
CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: see_what_works
301259
run: run-tests pathfinder
302260

303261
- name: Run cuda.bindings tests
@@ -321,16 +279,16 @@ jobs:
321279
pip install $(ls cuda_python*.whl)[all]
322280
fi
323281
324-
- name: Install cuda.pathfinder nvidia_wheels_cu13
325-
if: startsWith(matrix.CUDA_VER, '13.')
282+
- name: Install cuda.pathfinder extra wheels for testing
326283
run: |
284+
set -euo pipefail
327285
pushd cuda_pathfinder
328-
pip install -v .[nvidia_wheels_cu13]
329-
pip freeze
286+
pip install --only-binary=:all: -v ".[nvidia_wheels_cu${TEST_CUDA_MAJOR},nvidia_wheels_host]"
287+
pip list
330288
popd
331289
332290
- name: Run cuda.pathfinder tests with all_must_work
333-
if: startsWith(matrix.CUDA_VER, '13.')
334291
env:
335292
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: all_must_work
293+
CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: all_must_work
336294
run: run-tests pathfinder

0 commit comments

Comments
 (0)