From 99566ad319220d8fea4c2a3156edbd26f675314d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sat, 29 Aug 2026 12:52:34 -0700 Subject: [PATCH 1/3] fix(ci): keep cuobjdump deselect environment-gated --- .github/workflows/test-wheel-linux.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 2fd918e2859..866804bff8d 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -487,11 +487,21 @@ jobs: # numba package at collection time, which cuSIMT intentionally does # not depend on. See NVIDIA/numba-cuda-mlir#136. # + DESELECTS=() + # Environment-gated deselect: cuobjdump is not on PATH in the base + # ubuntu:24.04 container. Keep this independent of the version gate + # below so an unrelated upstream fix cannot retire it. See + # NVIDIA/numba-cuda-mlir#286. + if ! command -v cuobjdump > /dev/null; then + DESELECTS+=( + --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn' + ) + fi + # Version-gated deselects: when a newer numba-cuda-mlir release # ships with the referenced fix, the guard evaluates false and the # tests get run automatically. If they still fail on the newer # version we hear about it loudly (rather than silently masking). - DESELECTS=() if python -c "from packaging.version import Version; import sys; sys.exit(0 if Version('${NUMBA_CUDA_MLIR_VER}') <= Version('0.4.1') else 1)"; then # NVIDIA/numba-cuda-mlir#135: serial-pytest contamination of # numba_cuda_mlir.cuda.cudadrv from an xfailed test in @@ -502,12 +512,6 @@ jobs: # win-64 across runs), so we deselect the union of all tests # #135 lists as vulnerable + test_fortran_contiguous (observed # to hit the same contamination in our runs). - # - # test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn: - # subprocess-invokes `cuobjdump`, not on PATH in the base - # ubuntu:24.04 container. (Linux-only; Windows runners ship - # cuobjdump with the local CTK. No upstream fix yet — pending - # a skip-guard bug to be filed against NVIDIA/numba-cuda-mlir.) DESELECTS+=( --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream' --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream' @@ -518,7 +522,6 @@ jobs: --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync' --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams' --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous' - --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn' ) fi pytest -rxXs -v \ From b8e5488932fa8e35d8f2b6ab7545afff09b1f10f Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sat, 29 Aug 2026 13:52:16 -0700 Subject: [PATCH 2/3] Revert "fix(ci): keep cuobjdump deselect environment-gated" This reverts commit 99566ad319220d8fea4c2a3156edbd26f675314d. --- .github/workflows/test-wheel-linux.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 866804bff8d..2fd918e2859 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -487,21 +487,11 @@ jobs: # numba package at collection time, which cuSIMT intentionally does # not depend on. See NVIDIA/numba-cuda-mlir#136. # - DESELECTS=() - # Environment-gated deselect: cuobjdump is not on PATH in the base - # ubuntu:24.04 container. Keep this independent of the version gate - # below so an unrelated upstream fix cannot retire it. See - # NVIDIA/numba-cuda-mlir#286. - if ! command -v cuobjdump > /dev/null; then - DESELECTS+=( - --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn' - ) - fi - # Version-gated deselects: when a newer numba-cuda-mlir release # ships with the referenced fix, the guard evaluates false and the # tests get run automatically. If they still fail on the newer # version we hear about it loudly (rather than silently masking). + DESELECTS=() if python -c "from packaging.version import Version; import sys; sys.exit(0 if Version('${NUMBA_CUDA_MLIR_VER}') <= Version('0.4.1') else 1)"; then # NVIDIA/numba-cuda-mlir#135: serial-pytest contamination of # numba_cuda_mlir.cuda.cudadrv from an xfailed test in @@ -512,6 +502,12 @@ jobs: # win-64 across runs), so we deselect the union of all tests # #135 lists as vulnerable + test_fortran_contiguous (observed # to hit the same contamination in our runs). + # + # test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn: + # subprocess-invokes `cuobjdump`, not on PATH in the base + # ubuntu:24.04 container. (Linux-only; Windows runners ship + # cuobjdump with the local CTK. No upstream fix yet — pending + # a skip-guard bug to be filed against NVIDIA/numba-cuda-mlir.) DESELECTS+=( --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream' --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream' @@ -522,6 +518,7 @@ jobs: --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync' --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams' --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous' + --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn' ) fi pytest -rxXs -v \ From 35071a635c65a53c540f3e08e35d70215e6364c7 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sat, 29 Aug 2026 13:55:37 -0700 Subject: [PATCH 3/3] fix(ci): use numba-cuda-mlir wheel-only skips --- .github/workflows/test-wheel-linux.yml | 42 ++++-------------------- .github/workflows/test-wheel-windows.yml | 27 ++++----------- 2 files changed, 12 insertions(+), 57 deletions(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 2fd918e2859..c950ce08547 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -478,7 +478,13 @@ jobs: - name: Run numba-cuda-mlir tests if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }} + env: + LOCAL_CTK: ${{ matrix.LOCAL_CTK }} run: | + if [[ "${LOCAL_CTK}" != 1 ]]; then + # Let numba-cuda-mlir skip inputs that require toolkit executables. + export NUMBA_CUDA_MLIR_TEST_WHEEL_ONLY=1 + fi pushd numba-cuda-mlir-released # Install this tag's test deps (pytest + plugins + ml-dtypes + ...). pip install --upgrade "pip>=25.1" @@ -486,45 +492,9 @@ jobs: # Skip tests/benchmarks/ and tests/doc_examples/ — they import the # numba package at collection time, which cuSIMT intentionally does # not depend on. See NVIDIA/numba-cuda-mlir#136. - # - # Version-gated deselects: when a newer numba-cuda-mlir release - # ships with the referenced fix, the guard evaluates false and the - # tests get run automatically. If they still fail on the newer - # version we hear about it loudly (rather than silently masking). - DESELECTS=() - if python -c "from packaging.version import Version; import sys; sys.exit(0 if Version('${NUMBA_CUDA_MLIR_VER}') <= Version('0.4.1') else 1)"; then - # NVIDIA/numba-cuda-mlir#135: serial-pytest contamination of - # numba_cuda_mlir.cuda.cudadrv from an xfailed test in - # test_nrt_comprehensive.py contaminates any later test that - # touches cuda.cudadrv.driver. Upstream CI hides it via - # `-n auto --dist loadscope`. Which specific tests fail depends - # on collection order (we saw different subsets on linux-64 vs - # win-64 across runs), so we deselect the union of all tests - # #135 lists as vulnerable + test_fortran_contiguous (observed - # to hit the same contamination in our runs). - # - # test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn: - # subprocess-invokes `cuobjdump`, not on PATH in the base - # ubuntu:24.04 container. (Linux-only; Windows runners ship - # cuobjdump with the local CTK. No upstream fix yet — pending - # a skip-guard bug to be filed against NVIDIA/numba-cuda-mlir.) - DESELECTS+=( - --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream' - --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream' - --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous' - --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn' - ) - fi pytest -rxXs -v \ --ignore=tests/benchmarks \ --ignore=tests/doc_examples \ - "${DESELECTS[@]}" \ tests/ popd diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index 1af7c4b625b..4d4f4781905 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -462,35 +462,20 @@ jobs: - name: Run numba-cuda-mlir tests if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }} + env: + LOCAL_CTK: ${{ matrix.LOCAL_CTK }} shell: bash --noprofile --norc -xeuo pipefail {0} run: | + if [[ "${LOCAL_CTK}" != 1 ]]; then + # Let numba-cuda-mlir skip inputs that require toolkit executables. + export NUMBA_CUDA_MLIR_TEST_WHEEL_ONLY=1 + fi pushd numba-cuda-mlir-released pip install --upgrade "pip>=25.1" pip install --group test - # Version-gated deselects — dropped automatically when newer - # cuSIMT release ships. See linux step for full rationale. - # NVIDIA/numba-cuda-mlir#135 poisons a subset of tests that - # varies across runs based on collection order, so we deselect - # the full union rather than trying to enumerate what happened - # to fail on the most recent nightly. - DESELECTS=() - if python -c "from packaging.version import Version; import sys; sys.exit(0 if Version('${NUMBA_CUDA_MLIR_VER}') <= Version('0.4.1') else 1)"; then - DESELECTS+=( - --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream' - --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream' - --deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams' - --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous' - ) - fi pytest -rxXs -v \ --ignore=tests/benchmarks \ --ignore=tests/doc_examples \ - "${DESELECTS[@]}" \ tests/ popd