Skip to content

Commit bd75451

Browse files
authored
fix(ci): use numba-cuda-mlir wheel-only skips (#2733)
* fix(ci): keep cuobjdump deselect environment-gated * Revert "fix(ci): keep cuobjdump deselect environment-gated" This reverts commit 99566ad. * fix(ci): use numba-cuda-mlir wheel-only skips
1 parent 33f2b42 commit bd75451

2 files changed

Lines changed: 12 additions & 57 deletions

File tree

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

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -481,53 +481,23 @@ jobs:
481481

482482
- name: Run numba-cuda-mlir tests
483483
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }}
484+
env:
485+
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
484486
run: |
487+
if [[ "${LOCAL_CTK}" != 1 ]]; then
488+
# Let numba-cuda-mlir skip inputs that require toolkit executables.
489+
export NUMBA_CUDA_MLIR_TEST_WHEEL_ONLY=1
490+
fi
485491
pushd numba-cuda-mlir-released
486492
# Install this tag's test deps (pytest + plugins + ml-dtypes + ...).
487493
pip install --upgrade "pip>=25.1"
488494
pip install --group test
489495
# Skip tests/benchmarks/ and tests/doc_examples/ — they import the
490496
# numba package at collection time, which cuSIMT intentionally does
491497
# not depend on. See NVIDIA/numba-cuda-mlir#136.
492-
#
493-
# Version-gated deselects: when a newer numba-cuda-mlir release
494-
# ships with the referenced fix, the guard evaluates false and the
495-
# tests get run automatically. If they still fail on the newer
496-
# version we hear about it loudly (rather than silently masking).
497-
DESELECTS=()
498-
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
499-
# NVIDIA/numba-cuda-mlir#135: serial-pytest contamination of
500-
# numba_cuda_mlir.cuda.cudadrv from an xfailed test in
501-
# test_nrt_comprehensive.py contaminates any later test that
502-
# touches cuda.cudadrv.driver. Upstream CI hides it via
503-
# `-n auto --dist loadscope`. Which specific tests fail depends
504-
# on collection order (we saw different subsets on linux-64 vs
505-
# win-64 across runs), so we deselect the union of all tests
506-
# #135 lists as vulnerable + test_fortran_contiguous (observed
507-
# to hit the same contamination in our runs).
508-
#
509-
# test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn:
510-
# subprocess-invokes `cuobjdump`, not on PATH in the base
511-
# ubuntu:24.04 container. (Linux-only; Windows runners ship
512-
# cuobjdump with the local CTK. No upstream fix yet — pending
513-
# a skip-guard bug to be filed against NVIDIA/numba-cuda-mlir.)
514-
DESELECTS+=(
515-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream'
516-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream'
517-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync'
518-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync'
519-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync'
520-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync'
521-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync'
522-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams'
523-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous'
524-
--deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn'
525-
)
526-
fi
527498
pytest -rxXs -v \
528499
--ignore=tests/benchmarks \
529500
--ignore=tests/doc_examples \
530-
"${DESELECTS[@]}" \
531501
tests/
532502
popd
533503

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

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -465,35 +465,20 @@ jobs:
465465

466466
- name: Run numba-cuda-mlir tests
467467
if: ${{ inputs.test-mode == 'nightly-numba-cuda-mlir' && env.NUMBA_CUDA_MLIR_VER != '' }}
468+
env:
469+
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
468470
shell: bash --noprofile --norc -xeuo pipefail {0}
469471
run: |
472+
if [[ "${LOCAL_CTK}" != 1 ]]; then
473+
# Let numba-cuda-mlir skip inputs that require toolkit executables.
474+
export NUMBA_CUDA_MLIR_TEST_WHEEL_ONLY=1
475+
fi
470476
pushd numba-cuda-mlir-released
471477
pip install --upgrade "pip>=25.1"
472478
pip install --group test
473-
# Version-gated deselects — dropped automatically when newer
474-
# cuSIMT release ships. See linux step for full rationale.
475-
# NVIDIA/numba-cuda-mlir#135 poisons a subset of tests that
476-
# varies across runs based on collection order, so we deselect
477-
# the full union rather than trying to enumerate what happened
478-
# to fail on the most recent nightly.
479-
DESELECTS=()
480-
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
481-
DESELECTS+=(
482-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream'
483-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream'
484-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync'
485-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync'
486-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync'
487-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync'
488-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync'
489-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams'
490-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous'
491-
)
492-
fi
493479
pytest -rxXs -v \
494480
--ignore=tests/benchmarks \
495481
--ignore=tests/doc_examples \
496-
"${DESELECTS[@]}" \
497482
tests/
498483
popd
499484

0 commit comments

Comments
 (0)