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