Skip to content

Commit e8d147f

Browse files
Merge branch 'main' into rapids-26.04
2 parents e5bade7 + 3544ead commit e8d147f

9 files changed

Lines changed: 149 additions & 48 deletions

File tree

.github/actions/fetch_ctk/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ runs:
6464

6565
- name: Download CTK cache
6666
id: ctk-get-cache
67-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
67+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
6868
continue-on-error: true
6969
with:
7070
key: ${{ env.CTK_CACHE_KEY }}
@@ -107,7 +107,7 @@ runs:
107107
function populate_cuda_path() {
108108
# take the component name as a argument
109109
function download() {
110-
curl -kLSs $1 -o $2
110+
curl -LSs $1 -o $2
111111
}
112112
CTK_COMPONENT=$1
113113
CTK_COMPONENT_REL_PATH="$(curl -s $CTK_JSON_URL |
@@ -146,7 +146,7 @@ runs:
146146
- name: Upload CTK cache
147147
if: ${{ !cancelled() &&
148148
steps.ctk-get-cache.outputs.cache-hit != 'true' }}
149-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
149+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
150150
with:
151151
key: ${{ env.CTK_CACHE_KEY }}
152152
path: ./${{ env.CTK_CACHE_FILENAME }}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: BSD-2-Clause
4+
5+
name: sccache summary
6+
description: Parse sccache stats JSON and write a summary table to GITHUB_STEP_SUMMARY
7+
8+
# 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).
11+
12+
inputs:
13+
json-file:
14+
description: "Path to the sccache stats JSON file (from sccache --show-stats --stats-format=json)"
15+
required: true
16+
label:
17+
description: "Label for the stats row (e.g. cuda.bindings, cuda.core)"
18+
required: false
19+
default: "sccache"
20+
build-step:
21+
description: "Name of the cibuildwheel build step (for deep-link in summary)"
22+
required: false
23+
default: ""
24+
25+
runs:
26+
using: composite
27+
steps:
28+
- name: Report sccache stats
29+
shell: bash --noprofile --norc -euo pipefail {0}
30+
env:
31+
SCCACHE_JSON: ${{ inputs.json-file }}
32+
SCCACHE_LABEL: ${{ inputs.label }}
33+
SCCACHE_BUILD_STEP: ${{ inputs.build-step }}
34+
run: |
35+
if [ ! -f "$SCCACHE_JSON" ]; then
36+
echo "::warning::sccache stats file not found: $SCCACHE_JSON"
37+
exit 0
38+
fi
39+
40+
python3 - <<'PYEOF'
41+
import json, os, urllib.parse
42+
43+
json_file = os.environ["SCCACHE_JSON"]
44+
label = os.environ["SCCACHE_LABEL"]
45+
build_step = os.environ.get("SCCACHE_BUILD_STEP", "")
46+
47+
with open(json_file) as f:
48+
stats = json.load(f)["stats"]
49+
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"}
54+
hits = sum(
55+
v for k, v in stats.get("cache_hits", {}).get("counts", {}).items()
56+
if k in counted_languages
57+
)
58+
misses = sum(
59+
v for k, v in stats.get("cache_misses", {}).get("counts", {}).items()
60+
if k in counted_languages
61+
)
62+
total = hits + misses
63+
pct = int(100 * hits / total) if total > 0 else 0
64+
65+
# Build a deep-link to the cibuildwheel step if step name is provided.
66+
# GHA step summary links use the format: #step:N:L but we can't know the
67+
# step number here. Instead, link to the job page with a search hint.
68+
link_note = ""
69+
if build_step:
70+
link_note = f"\n\n_Full stats in the **{build_step}** step log._\n"
71+
72+
summary_file = os.environ.get("GITHUB_STEP_SUMMARY", "")
73+
if summary_file:
74+
with open(summary_file, "a") as sf:
75+
sf.write(f"### 📊 {label} — sccache stats\n")
76+
sf.write("| Hit Rate | Hits | Misses | Requests |\n")
77+
sf.write("|----------|------|--------|----------|\n")
78+
sf.write(f"| {pct}% | {hits} | {misses} | {total} |{link_note}\n")
79+
80+
print(f"{label}: {pct}% hit rate ({hits}/{total})")
81+
PYEOF

.github/workflows/build-wheel.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
(inputs.host-platform == 'win-64' && 'windows-2022') }}
4141
steps:
4242
- name: Checkout ${{ github.event.repository.name }}
43-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
43+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4444
with:
4545
fetch-depth: 0
4646

@@ -81,7 +81,7 @@ jobs:
8181

8282
- name: Set up MSVC
8383
if: ${{ startsWith(inputs.host-platform, 'win') }}
84-
uses: ilammy/msvc-dev-cmd@v1 # TODO: ask admin to allow pinning commits
84+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
8585

8686
- name: Set environment variables
8787
env:
@@ -95,7 +95,7 @@ jobs:
9595
env
9696
9797
- name: Build numba-cuda wheel
98-
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
98+
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
9999
with:
100100
package-dir: .
101101
output-dir: ${{ env.NUMBA_CUDA_ARTIFACTS_DIR }}
@@ -114,13 +114,22 @@ jobs:
114114
SCCACHE_GHA_USE_PREPROCESSOR_CACHE_MODE=${{ env.SCCACHE_GHA_USE_PREPROCESSOR_CACHE_MODE }}
115115
# check cache stats before leaving cibuildwheel
116116
CIBW_BEFORE_TEST_LINUX: >
117-
"/host/${{ env.SCCACHE_PATH }}" --show-adv-stats
117+
"/host/${{ env.SCCACHE_PATH }}" --show-adv-stats &&
118+
"/host/${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_numba_cuda.json
118119
# force the test stage to be run (so that before-test is not skipped)
119120
# TODO: we might want to think twice on adding this, it does a lot of
120121
# things before reaching this command.
121122
CIBW_TEST_COMMAND_LINUX: >
122123
echo "ok!"
123124
125+
- name: Report sccache stats (numba-cuda)
126+
if: ${{ inputs.host-platform != 'win-64' }}
127+
uses: ./.github/actions/sccache-summary
128+
with:
129+
json-file: sccache_numba_cuda.json
130+
label: "numba-cuda"
131+
build-step: "Build numba-cuda wheel"
132+
124133
- name: List the numba-cuda artifacts directory
125134
run: |
126135
if [[ "${{ inputs.host-platform }}" == win* ]]; then
@@ -156,7 +165,7 @@ jobs:
156165
(inputs.host-platform == 'win-64' && 'windows-2022') }}
157166
steps:
158167
- name: Checkout ${{ github.event.repository.name }}
159-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
168+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
160169
with:
161170
fetch-depth: 0
162171

@@ -195,7 +204,7 @@ jobs:
195204

196205
- name: Set up MSVC
197206
if: ${{ startsWith(inputs.host-platform, 'win') }}
198-
uses: ilammy/msvc-dev-cmd@v1 # TODO: ask admin to allow pinning commits
207+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
199208

200209
- name: Set environment variables
201210
env:
@@ -212,7 +221,7 @@ jobs:
212221
env
213222
214223
- name: Download numba-cuda build artifacts
215-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
224+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
216225
with:
217226
name: ${{ env.NUMBA_CUDA_ARTIFACT_NAME }}
218227
path: ${{ env.NUMBA_CUDA_ARTIFACTS_DIR }}
@@ -261,8 +270,17 @@ jobs:
261270
262271
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
263272
"${SCCACHE_PATH}" --show-adv-stats
273+
"${SCCACHE_PATH}" --show-stats --stats-format=json > "${GITHUB_WORKSPACE}/sccache_test_artifacts_cu${CUDA_MAJOR}.json"
264274
fi
265275
276+
- name: Report sccache stats (test artifacts cu${{ env.CUDA_MAJOR }})
277+
if: ${{ inputs.host-platform != 'win-64' }}
278+
uses: ./.github/actions/sccache-summary
279+
with:
280+
json-file: sccache_test_artifacts_cu${{ env.CUDA_MAJOR }}.json
281+
label: "test artifacts (CUDA ${{ matrix.cuda-version }})"
282+
build-step: "Build numba-cuda test artifacts aginst CUDA ${{ matrix.cuda-version }}"
283+
266284
- name: Upload numba-cuda test artifacts
267285
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
268286
with:
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
CUDA_PREV_BUILD_VER: ${{ steps.get-vars.outputs.cuda_prev_build_ver }}
2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828
with:
2929
fetch-depth: 0
3030

@@ -42,7 +42,7 @@ jobs:
4242
skip: ${{ steps.get-should-skip.outputs.skip }}
4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
45+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4646
- name: Compute whether to skip builds and tests
4747
id: get-should-skip
4848
env:
@@ -247,7 +247,6 @@ jobs:
247247
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber == 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
248248

249249
test-thirdparty-nvmath:
250-
if: ${{ github.ref_name == 'main' }}
251250
needs:
252251
- build-linux-64
253252
- compute-matrix

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
CUDA_PREV_BUILD_VER: ${{ steps.get-vars.outputs.cuda_prev_build_ver }}
2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525
with:
2626
fetch-depth: 0
2727

@@ -69,7 +69,7 @@ jobs:
6969
timeout-minutes: 10
7070
steps:
7171
- name: Download wheels
72-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
72+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
7373
with:
7474
pattern: numba-cuda-python*
7575
path: dist/
@@ -90,7 +90,7 @@ jobs:
9090
runs-on: ubuntu-latest
9191
steps:
9292
- name: Download wheels
93-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
93+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
9494
with:
9595
pattern: numba-cuda-python*
9696
path: wheels/

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
3333
steps:
3434
- name: Checkout ${{ github.event.repository.name }}
35-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
35+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3636

3737
- name: Validate Test Type
3838
run: |
@@ -59,12 +59,12 @@ jobs:
5959
echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
6060
6161
test:
62-
name: py${{ matrix.PY_VER }}, ${{ matrix.CUDA_VER }}, ${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}, ${{ matrix.GPU }}${{ matrix.GPU_COUNT != '1' && format('(x{0})', matrix.GPU_COUNT) || '' }}
62+
name: py${{ matrix.PY_VER }}, ${{ matrix.CUDA_VER }}, ${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}, ${{ matrix.GPU }}${{ matrix.GPU_COUNT != '1' && format('(x{0})', matrix.GPU_COUNT) || '' }}${{ matrix.FLAVOR && format(', {0}', matrix.FLAVOR) || '' }}
6363
needs: compute-matrix
6464
strategy:
6565
fail-fast: false
6666
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
67-
runs-on: "linux-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.GPU_COUNT }}"
67+
runs-on: "${{ matrix.FLAVOR || 'linux' }}-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.GPU_COUNT }}"
6868
# The build stage could fail but we want the CI to keep moving.
6969
if: ${{ github.repository_owner == 'nvidia' && !cancelled() }}
7070
# Our self-hosted runners require a container
@@ -73,12 +73,13 @@ jobs:
7373
image: ubuntu:22.04
7474
env:
7575
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
76+
PIP_CACHE_DIR: "/tmp/pip-cache"
7677
steps:
7778
- name: Ensure GPU is working
7879
run: nvidia-smi
7980

8081
- name: Checkout ${{ github.event.repository.name }}
81-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
82+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8283

8384
- name: Setup proxy cache
8485
uses: nv-gha-runners/setup-proxy-cache@main
@@ -104,7 +105,7 @@ jobs:
104105
run: ./ci/tools/env-vars test
105106

106107
- name: Download numba-cuda build artifacts
107-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
108+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
108109
with:
109110
name: ${{ env.NUMBA_CUDA_ARTIFACT_NAME }}
110111
path: ${{ env.NUMBA_CUDA_ARTIFACTS_DIR }}
@@ -115,7 +116,7 @@ jobs:
115116
ls -lahR $NUMBA_CUDA_ARTIFACTS_DIR
116117
117118
- name: Download numba-cuda test artifacts
118-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
119+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
119120
with:
120121
name: ${{ env.NUMBA_CUDA_TEST_ARTIFACT_NAME }}-cu${{ env.TEST_CUDA_MAJOR }}
121122
path: testing/

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
3131
steps:
3232
- name: Checkout ${{ github.event.repository.name }}
33-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3434

3535
- name: Validate Test Type
3636
run: |
@@ -66,7 +66,7 @@ jobs:
6666
runs-on: "windows-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.GPU_COUNT }}"
6767
steps:
6868
- name: Checkout ${{ github.event.repository.name }}
69-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
69+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7070

7171
- name: Setup proxy cache
7272
uses: nv-gha-runners/setup-proxy-cache@main
@@ -104,7 +104,7 @@ jobs:
104104
run: ./ci/tools/env-vars test
105105

106106
- name: Download numba-cuda build artifacts
107-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
107+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
108108
with:
109109
name: ${{ env.NUMBA_CUDA_ARTIFACT_NAME }}
110110
path: ${{ env.NUMBA_CUDA_ARTIFACTS_DIR }}
@@ -115,7 +115,7 @@ jobs:
115115
Get-ChildItem -Recurse -Force $env:NUMBA_CUDA_ARTIFACTS_DIR | Select-Object Mode, LastWriteTime, Length, FullName
116116
117117
- name: Download numba-cuda test artifacts
118-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
118+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
119119
with:
120120
name: ${{ env.NUMBA_CUDA_TEST_ARTIFACT_NAME }}-cu${{ env.TEST_CUDA_MAJOR }}
121121
path: testing/

.github/workflows/wheels-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
SHA: ${{ github.sha }}
122122
run: ./ci/tools/env-vars test
123123

124-
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
124+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
125125
with:
126126
name: ${{ env.NUMBA_CUDA_ARTIFACT_NAME }}
127127
path: ${{ env.NUMBA_CUDA_ARTIFACTS_DIR }}

0 commit comments

Comments
 (0)