Skip to content

Commit 096420a

Browse files
committed
Merge remote-tracking branch 'origin/main' into ajost/graph-slots
# Conflicts: # cuda_core/cuda/core/graph/_graph_builder.pyi # cuda_core/cuda/core/graph/_graph_builder.pyx # cuda_core/tests/graph/test_graph_builder.py
2 parents ecfc0f3 + 5be658a commit 096420a

34 files changed

Lines changed: 1178 additions & 76 deletions

.github/workflows/build-wheel.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ jobs:
469469
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
470470
with:
471471
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
472-
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.o
472+
path: |
473+
${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.o
474+
${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.a
475+
${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.lib
473476
if-no-files-found: error
474477

475478
- name: Download cuda.bindings build artifacts from the prior branch

.github/workflows/ci-nightly.yml

Lines changed: 111 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
# Nightly CI pipeline that tests optional dependencies (PyTorch, numba-cuda)
6-
# against the latest cuda-python wheels built on main, and runs the standard
7-
# test suite on runners reserved for nightly-only use (e.g. arm64 l4×2).
6+
# against the latest cuda-python wheels built on main, runs the standard
7+
# test suite on runners reserved for nightly-only use (e.g. arm64 l4×2), and
8+
# exercises release-time CI helper scripts so they do not silently rot between releases.
89
#
910
# This workflow does NOT build wheels — it downloads them from the latest
1011
# successful CI run on main and runs integration/standard tests.
@@ -31,6 +32,22 @@ on:
3132
default: ''
3233

3334
jobs:
35+
test-ci-tools-for-release:
36+
name: "Nightly: CI tools for release"
37+
if: ${{ github.repository_owner == 'nvidia' }}
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
42+
with:
43+
fetch-depth: 1
44+
45+
- name: Run CI tools unit tests
46+
run: |
47+
python -m pip install pytest
48+
# Standalone CI tool tests; skip repo-root conftest.py (imports cuda.pathfinder).
49+
python -m pytest -v --noconftest ci/tools/tests
50+
3451
find-wheels:
3552
runs-on: ubuntu-latest
3653
outputs:
@@ -192,6 +209,82 @@ jobs:
192209
test-mode: nightly-numba-cuda
193210
matrix_filter: 'map(select(.ENV.MODE == "nightly-numba-cuda"))'
194211

212+
# ── numba-cuda-mlir tests ──
213+
214+
test-numba-cuda-mlir-linux-64:
215+
name: "Nightly numba-cuda-mlir (linux-64)"
216+
if: ${{ github.repository_owner == 'nvidia' }}
217+
needs: find-wheels
218+
permissions:
219+
contents: read
220+
actions: read
221+
secrets: inherit
222+
uses: ./.github/workflows/test-wheel-linux.yml
223+
with:
224+
build-type: nightly
225+
host-platform: linux-64
226+
build-ctk-ver: ${{ needs.find-wheels.outputs.CUDA_BUILD_VER }}
227+
run-id: ${{ needs.find-wheels.outputs.RUN_ID }}
228+
sha: ${{ needs.find-wheels.outputs.HEAD_SHA }}
229+
test-mode: nightly-numba-cuda-mlir
230+
matrix_filter: 'map(select(.ENV.MODE == "nightly-numba-cuda-mlir"))'
231+
232+
test-numba-cuda-mlir-windows:
233+
name: "Nightly numba-cuda-mlir (win-64)"
234+
if: ${{ github.repository_owner == 'nvidia' }}
235+
needs: find-wheels
236+
permissions:
237+
contents: read
238+
actions: read
239+
secrets: inherit
240+
uses: ./.github/workflows/test-wheel-windows.yml
241+
with:
242+
build-type: nightly
243+
host-platform: win-64
244+
build-ctk-ver: ${{ needs.find-wheels.outputs.CUDA_BUILD_VER }}
245+
run-id: ${{ needs.find-wheels.outputs.RUN_ID }}
246+
sha: ${{ needs.find-wheels.outputs.HEAD_SHA }}
247+
test-mode: nightly-numba-cuda-mlir
248+
matrix_filter: 'map(select(.ENV.MODE == "nightly-numba-cuda-mlir"))'
249+
250+
# ── Released cuda-core against main pathfinder/bindings ──
251+
252+
test-cuda-core-linux-64:
253+
name: "Nightly cuda-core (linux-64)"
254+
if: ${{ github.repository_owner == 'nvidia' }}
255+
needs: find-wheels
256+
permissions:
257+
contents: read
258+
actions: read
259+
secrets: inherit
260+
uses: ./.github/workflows/test-wheel-linux.yml
261+
with:
262+
build-type: nightly
263+
host-platform: linux-64
264+
build-ctk-ver: ${{ needs.find-wheels.outputs.CUDA_BUILD_VER }}
265+
run-id: ${{ needs.find-wheels.outputs.RUN_ID }}
266+
sha: ${{ needs.find-wheels.outputs.HEAD_SHA }}
267+
test-mode: nightly-cuda-core
268+
matrix_filter: 'map(select(.ENV.MODE == "nightly-cuda-core"))'
269+
270+
test-cuda-core-windows:
271+
name: "Nightly cuda-core (win-64)"
272+
if: ${{ github.repository_owner == 'nvidia' }}
273+
needs: find-wheels
274+
permissions:
275+
contents: read
276+
actions: read
277+
secrets: inherit
278+
uses: ./.github/workflows/test-wheel-windows.yml
279+
with:
280+
build-type: nightly
281+
host-platform: win-64
282+
build-ctk-ver: ${{ needs.find-wheels.outputs.CUDA_BUILD_VER }}
283+
run-id: ${{ needs.find-wheels.outputs.RUN_ID }}
284+
sha: ${{ needs.find-wheels.outputs.HEAD_SHA }}
285+
test-mode: nightly-cuda-core
286+
matrix_filter: 'map(select(.ENV.MODE == "nightly-cuda-core"))'
287+
195288
# ── Standard tests on nightly-only runners ──
196289

197290
test-standard-linux-aarch64:
@@ -219,13 +312,18 @@ jobs:
219312
if: always()
220313
runs-on: ubuntu-latest
221314
needs:
315+
- test-ci-tools-for-release
222316
- find-wheels
223317
- test-pytorch-linux
224318
- test-pytorch-linux-aarch64
225319
- test-pytorch-windows
226320
- test-numba-cuda-linux-64
227321
- test-numba-cuda-linux-aarch64
228322
- test-numba-cuda-windows
323+
- test-numba-cuda-mlir-linux-64
324+
- test-numba-cuda-mlir-windows
325+
- test-cuda-core-linux-64
326+
- test-cuda-core-windows
229327
- test-standard-linux-aarch64
230328
steps:
231329
- name: Exit
@@ -235,7 +333,9 @@ jobs:
235333
# See ci.yml for the full rationale on why we must use always()
236334
# and explicitly check each result rather than relying on the
237335
# default behaviour.
238-
if ${{ needs.find-wheels.result != 'success' }}; then
336+
if ${{ needs.test-ci-tools-for-release.result == 'cancelled' ||
337+
needs.test-ci-tools-for-release.result == 'failure' ||
338+
needs.find-wheels.result != 'success' }}; then
239339
exit 1
240340
fi
241341
if ${{ needs.test-pytorch-linux.result == 'cancelled' ||
@@ -250,6 +350,14 @@ jobs:
250350
needs.test-numba-cuda-linux-aarch64.result == 'failure' ||
251351
needs.test-numba-cuda-windows.result == 'cancelled' ||
252352
needs.test-numba-cuda-windows.result == 'failure' ||
353+
needs.test-numba-cuda-mlir-linux-64.result == 'cancelled' ||
354+
needs.test-numba-cuda-mlir-linux-64.result == 'failure' ||
355+
needs.test-numba-cuda-mlir-windows.result == 'cancelled' ||
356+
needs.test-numba-cuda-mlir-windows.result == 'failure' ||
357+
needs.test-cuda-core-linux-64.result == 'cancelled' ||
358+
needs.test-cuda-core-linux-64.result == 'failure' ||
359+
needs.test-cuda-core-windows.result == 'cancelled' ||
360+
needs.test-cuda-core-windows.result == 'failure' ||
253361
needs.test-standard-linux-aarch64.result == 'cancelled' ||
254362
needs.test-standard-linux-aarch64.result == 'failure' }}; then
255363
exit 1

.github/workflows/release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,6 @@ jobs:
164164
with:
165165
python-version: "3.12"
166166

167-
# - name: Self-test release-notes checker
168-
# run: |
169-
# pip install pytest
170-
# pytest ci/tools/tests
171-
172167
- name: Check versioned release notes exist
173168
run: |
174169
python ci/tools/check_release_notes.py \

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

Lines changed: 112 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ on:
3737
default: ''
3838
test-mode:
3939
description: >
40-
Test mode: 'standard' (default), 'nightly-pytorch', or
41-
'nightly-numba-cuda'.
40+
Test mode: 'standard' (default), 'nightly-pytorch',
41+
'nightly-numba-cuda', 'nightly-numba-cuda-mlir', or
42+
'nightly-cuda-core'.
4243
type: string
4344
default: 'standard'
4445
sha:
@@ -409,6 +410,20 @@ jobs:
409410
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
410411
run: run-tests nightly-numba-cuda
411412

413+
- name: Install cuda-python wheels + numba-cuda-mlir
414+
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' }}
415+
env:
416+
CUDA_VER: ${{ matrix.CUDA_VER }}
417+
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
418+
run: run-tests nightly-numba-cuda-mlir
419+
420+
- name: Install main pathfinder/bindings + released cuda-core
421+
if: ${{ inputs.test-mode == 'nightly-cuda-core' }}
422+
env:
423+
CUDA_VER: ${{ matrix.CUDA_VER }}
424+
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
425+
run: run-tests nightly-cuda-core
426+
412427
# ── Nightly: run tests ──
413428
- name: Run PyTorch interop tests
414429
if: ${{ inputs.test-mode == 'nightly-pytorch' }}
@@ -420,3 +435,98 @@ jobs:
420435
- name: Run numba-cuda tests
421436
if: ${{ inputs.test-mode == 'nightly-numba-cuda' }}
422437
run: python -m numba.runtests numba.cuda.tests
438+
439+
- name: Checkout numba-cuda-mlir tests at matching tag
440+
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }}
441+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
442+
with:
443+
repository: NVIDIA/numba-cuda-mlir
444+
ref: v${{ env.NUMBA_CUDA_MLIR_VER }}
445+
path: numba-cuda-mlir-released
446+
447+
- name: Run numba-cuda-mlir tests
448+
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }}
449+
run: |
450+
pushd numba-cuda-mlir-released
451+
# Install this tag's test deps (pytest + plugins + ml-dtypes + ...).
452+
pip install --upgrade "pip>=25.1"
453+
pip install --group test
454+
# Skip tests/benchmarks/ and tests/doc_examples/ — they import the
455+
# numba package at collection time, which cuSIMT intentionally does
456+
# not depend on. See NVIDIA/numba-cuda-mlir#136.
457+
#
458+
# Version-gated deselects: when a newer numba-cuda-mlir release
459+
# ships with the referenced fix, the guard evaluates false and the
460+
# tests get run automatically. If they still fail on the newer
461+
# version we hear about it loudly (rather than silently masking).
462+
DESELECTS=()
463+
if python -c "from packaging.version import Version; import sys; sys.exit(0 if Version('${NUMBA_CUDA_MLIR_VER}') <= Version('0.4.0') else 1)"; then
464+
# NVIDIA/numba-cuda-mlir#135: serial-pytest contamination of
465+
# numba_cuda_mlir.cuda.cudadrv from an xfailed test in
466+
# test_nrt_comprehensive.py contaminates any later test that
467+
# touches cuda.cudadrv.driver. Upstream CI hides it via
468+
# `-n auto --dist loadscope`. Which specific tests fail depends
469+
# on collection order (we saw different subsets on linux-64 vs
470+
# win-64 across runs), so we deselect the union of all tests
471+
# #135 lists as vulnerable + test_fortran_contiguous (observed
472+
# to hit the same contamination in our runs).
473+
#
474+
# test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn:
475+
# subprocess-invokes `cuobjdump`, not on PATH in the base
476+
# ubuntu:24.04 container. (Linux-only; Windows runners ship
477+
# cuobjdump with the local CTK. No upstream fix yet — pending
478+
# a skip-guard bug to be filed against NVIDIA/numba-cuda-mlir.)
479+
DESELECTS+=(
480+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream'
481+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream'
482+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync'
483+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync'
484+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync'
485+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync'
486+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync'
487+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams'
488+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous'
489+
--deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn'
490+
)
491+
fi
492+
pytest -rxXs -v --durations=0 \
493+
--ignore=tests/benchmarks \
494+
--ignore=tests/doc_examples \
495+
"${DESELECTS[@]}" \
496+
tests/
497+
popd
498+
499+
- name: Checkout released cuda-core tests at matching tag
500+
if: ${{ inputs.test-mode == 'nightly-cuda-core' && env.CUDA_CORE_RELEASED_VER != '' }}
501+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
502+
with:
503+
ref: cuda-core-v${{ env.CUDA_CORE_RELEASED_VER }}
504+
path: cuda-core-released
505+
506+
- name: Run released cuda-core tests
507+
if: ${{ inputs.test-mode == 'nightly-cuda-core' && env.CUDA_CORE_RELEASED_VER != '' }}
508+
run: |
509+
pushd cuda-core-released/cuda_core
510+
# Install the released tag's test group so we exercise the exact deps
511+
# that cuda-core version shipped with.
512+
pip install --upgrade "pip>=25.1"
513+
pip install --group "${CUDA_CORE_TEST_GROUP}"
514+
# Cap pytest below 9.1: released cuda-core <=1.0.1 has parametrize
515+
# patterns that pytest 9.1 rejects; the main-side fix (#2212) has
516+
# not yet shipped in a cuda-core release.
517+
pip install "pytest<9.1"
518+
# Version-gated deselect: drops automatically when a newer
519+
# cuda-core release with the wrapper-mapping update ships.
520+
DESELECTS=()
521+
if python -c "from packaging.version import Version; import sys; sys.exit(0 if Version('${CUDA_CORE_RELEASED_VER}') <= Version('1.0.1') else 1)"; then
522+
# NvlinkVersion: v1.0.1's wrapper mapping predates
523+
# NvlinkVersion.VERSION_6_0 which main cuda-bindings adds.
524+
# Expected drift on this mode until released cuda-core catches up.
525+
DESELECTS+=(
526+
--deselect 'tests/test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]'
527+
)
528+
fi
529+
pytest -rxXs -v --durations=0 --randomly-dont-reorganize \
530+
"${DESELECTS[@]}" \
531+
tests/
532+
popd

0 commit comments

Comments
 (0)