Skip to content

Commit 45c8b24

Browse files
authored
CI: nightly-cuda-core + nightly-numba-cuda-mlir + PTDS fix (#2283)
* CI: add nightly-cuda-core and nightly-numba-cuda-mlir modes nightly-cuda-core: test the released cuda-core from PyPI against main-built pathfinder and cuda-bindings, catching the "core released × bindings main" gap documented in issue #1955. Runs on linux-64 (a100) and win-64 (a100 MCDM). nightly-numba-cuda-mlir: MLIR-backend companion to nightly-numba-cuda. Installs main pathfinder+bindings+core plus numba-cuda-mlir from PyPI, runs numba-cuda-mlir's own test suite from the matching git tag. Linux amd64/arm64 x CUDA 12.9.1 / 13.3.0. Both modes fetch the released version's tests from git tags because the respective wheels do not ship test_*.py files. Includes tag-not-found fallback (log warning + exit 0) to avoid red-lining the nightly on a freshly-cut PyPI release that hasn't been pushed to git yet. * ci/test-matrix.yml: fix CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM typo The two ENV overrides intended to exercise the per-thread default stream code path were misspelled (missing the CUDA_ segment), so the env var was silently ignored and the PTDS coverage added in #1972 had no effect. Rename to the correct CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM. Refs #971. * cuda_pathfinder: pin nvshmem to <3.7 (was previously excluding only 3.7.0) nvidia-nvshmem-cu{12,13} 3.7.x breaks the main branch, not only 3.7.0. Widen the exclusion from an exact-version bump to <3.7 so 3.7.x and above are avoided until we can move forward. * nightly-numba-cuda-mlir: swap arm64 for win-64 coverage, use rtxpro6000 Drop the linux-aarch64 rows and instead add win-64 coverage with the same CUDA 12.9.1 / 13.3.0 pair. Switch all four rows from GPU l4 to rtxpro6000. Windows rows use DRIVER_MODE MCDM, matching the existing rtxpro6000 CUDA 13.3.0 patterns. * Temporarily add push trigger to ci-nightly.yml for testing Remove before merging. * CI: switch nightly-{cuda-core,numba-cuda-mlir} to actions/checkout for tests The initial approach used git inside the ubuntu:24.04 container to fetch the released version's test suite, but git is not installed on that container (install_unix_deps only pulls in jq/wget/g++/etc.) and its absence made the run steps silently skip via the tag-not-fetchable fallback. On Windows, git archive of just the cuda_core subtree also hit a dangling-symlink extraction failure (cuda_core/.git_archival.txt). Refactor to: - run-tests: just install wheels and expose the resolved release version (CUDA_CORE_RELEASED_VER / NUMBA_CUDA_MLIR_VER) and cuda-core test-group name via GITHUB_ENV. No more git operations. - test-wheel-{linux,windows}.yml: add an actions/checkout step per mode that pulls the matching release tag into a subdirectory (cuda-core-released / numba-cuda-mlir-released), then the follow-up test step installs that tag's test dep-group and runs pytest. For numba-cuda-mlir also pass --ignore=tests/benchmarks --ignore=tests/doc_examples to pytest: those directories import the `numba` package at module top and would fail collection, which is cuSIMT's expected behavior (see NVIDIA/numba-cuda-mlir#136 — cuSIMT intentionally does not depend on numba). * CI: pin numpy<2.5 (mlir) and pytest<9.1 (cuda-core released tests) Two nightly failure fixups after the first green iteration: nightly-numba-cuda-mlir: numba-cuda-mlir 0.4.0 has an inverted guard that registers an overload of np.row_stack on NumPy 2.x, and NumPy 2.5 removed that name entirely, so test collection fails with "AttributeError: module 'numpy' has no attribute 'row_stack'". Cap numpy to <2.5. See NVIDIA/numba-cuda-mlir#154. nightly-cuda-core: released cuda-core v1.0.1's test suite uses a parametrize argvalues pattern that pytest 9.1 rejects ("in parametrize the number of names (1)... must be equal to the number of values (3)"). The main-side fix was #2212 but it has not shipped in a cuda-core release yet. Cap pytest to <9.1 for the released-cuda-core test run only. * CI: deselect known pre-existing failures in nightly-cuda-core and nightly-numba-cuda-mlir Applied only in the affected nightly-* pytest invocations; the released source trees under test are unmodified. nightly-numba-cuda-mlir (all 10 tests deselected are from cuSIMT): * CudaArraySetting::{test_no_sync_default_stream, test_no_sync_supplied_stream, test_sync} TestCudaArrayInterface::{test_consume_no_sync, test_consume_sync, test_launch_no_sync, test_launch_sync, test_launch_sync_two_streams, test_fortran_contiguous} Serial-pytest contamination of numba_cuda_mlir.cuda.cudadrv from an xfailed test in test_nrt_comprehensive.py. Upstream CI runs with `pytest -n auto --dist loadscope`, which isolates the offending side effect in a separate xdist worker; our nightly runs serially and hits the pollution. See NVIDIA/numba-cuda-mlir#135. * TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn Subprocess-invokes `cuobjdump`, which isn't on PATH in the base ubuntu:24.04 container. Filed as an upstream skip-guard bug. nightly-cuda-core (3 tests deselected are pre-existing v1.0.1 issues): * test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion] Expected drift: main cuda-bindings adds NvlinkVersion.VERSION_6_0 which v1.0.1's wrapper mapping predates. This mode intentionally pairs released core with main bindings, so this coverage-style test will stay red here until a cuda-core release catches up. * test_rlcompleter_patch.py::test_opt_out_env_var_disables_patch_even_when_interactive Environment-dependent test: expects rlcompleter to crash without the tab-completion patch, but on Windows MCDM the pre-patch behavior is clean. Passes on Linux, fails on Windows MCDM. * test_memory.py::test_non_managed_resources_report_not_managed[pinned] Same underlying "Failed to allocate memory from pool" error that v1.0.1 already xfails in the sibling test_pinned_memory_resource_initialization (TODO(#9999)). cuda-python main has since fixed the parametrized case to route through _allocate_pinned_buffer_or_xfail(), but that fix hasn't shipped in a cuda-core release yet. * CI: tighten deselects to per-platform failing sets Previously applied the same list on both Linux and Windows workflows, which over-deselected — some tests only fail on one platform because the underlying issues (serial-pytest test-order in mlir, MCDM-only behavior in cuda-core) are platform-specific. Now: nightly-numba-cuda-mlir linux-64: TestCudaArrayInterface::{test_consume_no_sync, test_consume_sync, test_launch_no_sync, test_launch_sync, test_launch_sync_two_streams, test_fortran_contiguous} + TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn. win-64: CudaArraySetting::{test_no_sync_default_stream, test_no_sync_supplied_stream, test_sync} + TestCudaArrayInterface::test_fortran_contiguous. Test-order contamination in numba-cuda-mlir#135 surfaces different tests depending on collection order (linux-64 vs win-64 exercise different subsets), so the per-platform lists differ. cuobjdump-based TestLinkerDumpAssembly only fires on Linux because the ubuntu:24.04 container's PATH lacks cuobjdump; Windows runners ship it with the local CTK. nightly-cuda-core linux-64: test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]. win-64: NvlinkVersion (same as Linux) + test_rlcompleter_patch.py::test_opt_out_env_var_disables_patch_even_when_interactive + test_memory.py::test_non_managed_resources_report_not_managed[pinned]. rlcompleter and pinned mempool tests only fail on Windows MCDM. NvlinkVersion fails on both (expected drift for the mode). * CI: version-gate the nightly-mode deselects so they auto-clean Each deselect is now wrapped in a bash conditional keyed on the installed release version. When a newer numba-cuda-mlir or cuda-core release ships with the referenced fix, the nightly picks it up automatically, the guard evaluates false, and the deselect drops — so the tests run against the new release. If they still fail we hear about it loudly rather than silently masking a regression. Current guards: - numba-cuda-mlir #135 tests + cuobjdump TestLinkerDumpAssembly: applied when installed numba-cuda-mlir version <= 0.4.0. - cuda-core NvlinkVersion / rlcompleter opt-out / pinned mempool: applied when installed cuda-core version <= 1.0.1. Structure keeps one conditional block per (mode, platform) with a comment above each deselect explaining the tracking issue. * CI: broaden mlir deselect list to full #135 union across platforms The previous per-platform-tight lists were incomplete: NVIDIA/numba-cuda-mlir#135's import-time contamination poisons whichever tests reference cuda.cudadrv.driver AFTER the polluting xfail runs, and collection order varies between runs. Two consecutive Windows CI runs failed on different subsets (3 slicing tests one run, 5 interface tests the next). Deselect the full union of #135-listed tests + test_fortran_contiguous (observed to hit the same contamination) on both Linux and Windows. Same version guard (<= 0.4.0) still applies, so the whole block drops automatically when a newer numba-cuda-mlir release ships with the root-cause fix. Linux keeps the extra cuobjdump deselect (Linux-only environment issue). * Revert "cuda_pathfinder: pin nvshmem to <3.7 (was previously excluding only 3.7.0)" This reverts commit 2a42aa7. * Revert "Temporarily add push trigger to ci-nightly.yml for testing" This reverts commit a0ccd19.
1 parent 8d2d1d2 commit 45c8b24

5 files changed

Lines changed: 353 additions & 15 deletions

File tree

.github/workflows/ci-nightly.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,82 @@ jobs:
209209
test-mode: nightly-numba-cuda
210210
matrix_filter: 'map(select(.ENV.MODE == "nightly-numba-cuda"))'
211211

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+
212288
# ── Standard tests on nightly-only runners ──
213289

214290
test-standard-linux-aarch64:
@@ -244,6 +320,10 @@ jobs:
244320
- test-numba-cuda-linux-64
245321
- test-numba-cuda-linux-aarch64
246322
- 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
247327
- test-standard-linux-aarch64
248328
steps:
249329
- name: Exit
@@ -270,6 +350,14 @@ jobs:
270350
needs.test-numba-cuda-linux-aarch64.result == 'failure' ||
271351
needs.test-numba-cuda-windows.result == 'cancelled' ||
272352
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' ||
273361
needs.test-standard-linux-aarch64.result == 'cancelled' ||
274362
needs.test-standard-linux-aarch64.result == 'failure' }}; then
275363
exit 1

.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

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

Lines changed: 101 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:
@@ -388,6 +389,22 @@ jobs:
388389
shell: bash --noprofile --norc -xeuo pipefail {0}
389390
run: run-tests nightly-numba-cuda
390391

392+
- name: Install cuda-python wheels + numba-cuda-mlir
393+
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' }}
394+
env:
395+
CUDA_VER: ${{ matrix.CUDA_VER }}
396+
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
397+
shell: bash --noprofile --norc -xeuo pipefail {0}
398+
run: run-tests nightly-numba-cuda-mlir
399+
400+
- name: Install main pathfinder/bindings + released cuda-core
401+
if: ${{ inputs.test-mode == 'nightly-cuda-core' }}
402+
env:
403+
CUDA_VER: ${{ matrix.CUDA_VER }}
404+
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
405+
shell: bash --noprofile --norc -xeuo pipefail {0}
406+
run: run-tests nightly-cuda-core
407+
391408
# ── Nightly: run tests ──
392409
- name: Run PyTorch interop tests
393410
if: ${{ inputs.test-mode == 'nightly-pytorch' }}
@@ -401,3 +418,85 @@ jobs:
401418
if: ${{ inputs.test-mode == 'nightly-numba-cuda' }}
402419
shell: bash --noprofile --norc -xeuo pipefail {0}
403420
run: python -m numba.runtests numba.cuda.tests
421+
422+
- name: Checkout numba-cuda-mlir tests at matching tag
423+
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }}
424+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
425+
with:
426+
repository: NVIDIA/numba-cuda-mlir
427+
ref: v${{ env.NUMBA_CUDA_MLIR_VER }}
428+
path: numba-cuda-mlir-released
429+
430+
- name: Run numba-cuda-mlir tests
431+
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }}
432+
shell: bash --noprofile --norc -xeuo pipefail {0}
433+
run: |
434+
pushd numba-cuda-mlir-released
435+
pip install --upgrade "pip>=25.1"
436+
pip install --group test
437+
# Version-gated deselects — dropped automatically when newer
438+
# cuSIMT release ships. See linux step for full rationale.
439+
# NVIDIA/numba-cuda-mlir#135 poisons a subset of tests that
440+
# varies across runs based on collection order, so we deselect
441+
# the full union rather than trying to enumerate what happened
442+
# to fail on the most recent nightly.
443+
DESELECTS=()
444+
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
445+
DESELECTS+=(
446+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream'
447+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream'
448+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync'
449+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync'
450+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync'
451+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync'
452+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync'
453+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams'
454+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous'
455+
)
456+
fi
457+
pytest -rxXs -v --durations=0 \
458+
--ignore=tests/benchmarks \
459+
--ignore=tests/doc_examples \
460+
"${DESELECTS[@]}" \
461+
tests/
462+
popd
463+
464+
- name: Checkout released cuda-core tests at matching tag
465+
if: ${{ inputs.test-mode == 'nightly-cuda-core' && env.CUDA_CORE_RELEASED_VER != '' }}
466+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
467+
with:
468+
ref: cuda-core-v${{ env.CUDA_CORE_RELEASED_VER }}
469+
path: cuda-core-released
470+
471+
- name: Run released cuda-core tests
472+
if: ${{ inputs.test-mode == 'nightly-cuda-core' && env.CUDA_CORE_RELEASED_VER != '' }}
473+
shell: bash --noprofile --norc -xeuo pipefail {0}
474+
run: |
475+
pushd cuda-core-released/cuda_core
476+
pip install --upgrade "pip>=25.1"
477+
pip install --group "${CUDA_CORE_TEST_GROUP}"
478+
# Cap pytest below 9.1 — released cuda-core <=1.0.1 has parametrize
479+
# patterns that pytest 9.1 rejects (see #2212).
480+
pip install "pytest<9.1"
481+
# Version-gated deselects — dropped automatically when a newer
482+
# cuda-core release ships. See linux step for full rationale on
483+
# NvlinkVersion. The Windows-only tests are:
484+
# - test_rlcompleter_patch: env-dependent expectation that
485+
# passes on Linux, fails on Windows MCDM.
486+
# - test_non_managed_resources_report_not_managed[pinned]: same
487+
# MCDM mempool OOM v1.0.1 already xfails in
488+
# test_pinned_memory_resource_initialization (TODO(#9999));
489+
# main fixed the parametrized case via #2139 but v1.0.1 lacks
490+
# the fix.
491+
DESELECTS=()
492+
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
493+
DESELECTS+=(
494+
--deselect 'tests/test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]'
495+
--deselect 'tests/test_rlcompleter_patch.py::test_opt_out_env_var_disables_patch_even_when_interactive'
496+
--deselect 'tests/test_memory.py::test_non_managed_resources_report_not_managed[pinned]'
497+
)
498+
fi
499+
pytest -rxXs -v --durations=0 --randomly-dont-reorganize \
500+
"${DESELECTS[@]}" \
501+
tests/
502+
popd

0 commit comments

Comments
 (0)