Skip to content

Commit 35071a6

Browse files
committed
fix(ci): use numba-cuda-mlir wheel-only skips
1 parent b8e5488 commit 35071a6

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
@@ -478,53 +478,23 @@ jobs:
478478

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

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

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

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

0 commit comments

Comments
 (0)