Skip to content

Commit fbe880a

Browse files
committed
Merge branch 'main' into feature/cuda-core-texture-surface-467
# Conflicts: # cuda_core/tests/example_tests/test_basic_examples.py
2 parents 1432c0a + 774e988 commit fbe880a

326 files changed

Lines changed: 24837 additions & 3460 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/actionlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
self-hosted-runner:
88
labels:
99
- linux-amd64-cpu8
10+
- linux-amd64-gpu-l4-latest-1

.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: 70 additions & 9 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

@@ -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
@@ -91,15 +91,18 @@ jobs:
9191
9292
if [[ ${{ inputs.is-release }} == "true" ]]; then
9393
FILE_HASH="*"
94-
COMMIT_HASH="${{ inputs.git-tag }}"
94+
DOCS_GITHUB_REF="${{ inputs.git-tag }}"
95+
if [[ -z "${DOCS_GITHUB_REF}" ]]; then
96+
DOCS_GITHUB_REF="${GITHUB_REF_NAME}"
97+
fi
9598
else
9699
FILE_HASH="${{ github.sha }}"
97-
COMMIT_HASH="${{ github.sha }}"
100+
DOCS_GITHUB_REF="${{ github.sha }}"
98101
fi
99102
100103
# make outputs from the previous job as env vars
101104
CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-linux-64"
102-
echo "COMMIT_HASH=${COMMIT_HASH}" >> $GITHUB_ENV
105+
echo "CUDA_PYTHON_DOCS_GITHUB_REF=${DOCS_GITHUB_REF}" >> $GITHUB_ENV
103106
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
104107
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
105108
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
@@ -242,8 +245,66 @@ jobs:
242245
fi
243246
mv ${COMPONENT}/docs/build/html/* artifacts/docs/${TARGET}
244247
245-
# TODO: Consider removing this step?
246-
- name: Upload doc artifacts
248+
- name: Write rendered docs file list
249+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
250+
run: |
251+
find "${GITHUB_WORKSPACE}/artifacts/docs" -type f -name '*.html' ! -path '*/_static/*' \
252+
| LC_ALL=C sort > lychee-rendered-html-files.txt
253+
if [[ ! -s lychee-rendered-html-files.txt ]]; then
254+
echo "error: no rendered HTML pages found for lychee" >&2
255+
exit 1
256+
fi
257+
wc -l lychee-rendered-html-files.txt
258+
259+
- name: Restore lychee cache
260+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
261+
id: restore-lychee-cache
262+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
263+
with:
264+
path: .lycheecache
265+
key: docs-rendered-lychee-${{ env.PR_NUMBER }}-${{ github.sha }}
266+
restore-keys: |
267+
docs-rendered-lychee-${{ env.PR_NUMBER }}-
268+
269+
- name: Check rendered docs links
270+
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
271+
uses: lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # unreleased: supports v0.24.x archive layout
272+
with:
273+
# PR-preview canonical URLs are checked by the preview deployment workflow.
274+
# The cuda-bindings #id links are docutils "problematic" anchors from generated API docs.
275+
# TODO: Remove this exclusion after cybind stops emitting those problematic anchors.
276+
# Preferred Networks rejects hosted-runner GETs, but the URL is browser reachable.
277+
args: >-
278+
--files-from ${{ github.workspace }}/lychee-rendered-html-files.txt
279+
--include-fragments=full
280+
--cache
281+
--max-cache-age 1d
282+
--max-concurrency 16
283+
--host-concurrency 2
284+
--host-request-interval 250ms
285+
--max-retries 3
286+
--retry-wait-time 5
287+
--timeout 30
288+
--no-progress
289+
--exclude '^https://nvidia\.github\.io/cuda-python/pr-preview/pr-[0-9]+/'
290+
--exclude '^file://.*/cuda-bindings/latest/module/(driver|runtime)\.html#id[0-9]+$'
291+
--exclude '^https://www\.preferred\.jp/en/?$'
292+
fail: true
293+
failIfEmpty: true
294+
format: markdown
295+
jobSummary: false
296+
lycheeVersion: v0.24.2
297+
output: lychee-rendered-html.md
298+
token: ${{ github.token }}
299+
300+
- name: Save lychee cache
301+
if: ${{ always() && !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') && steps.restore-lychee-cache.outputs.cache-hit != 'true' && steps.restore-lychee-cache.outputs.cache-primary-key != '' }}
302+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
303+
with:
304+
path: .lycheecache
305+
key: ${{ steps.restore-lychee-cache.outputs.cache-primary-key }}
306+
307+
- name: Upload docs GitHub Pages artifact
247308
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
248309
with:
249310
path: artifacts/
@@ -265,5 +326,5 @@ jobs:
265326
git-config-email: cuda-python-bot@users.noreply.github.com
266327
folder: artifacts/docs/
267328
target-folder: docs/
268-
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.COMMIT_HASH }}"
329+
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.CUDA_PYTHON_DOCS_GITHUB_REF }}"
269330
clean: false

0 commit comments

Comments
 (0)