@@ -455,25 +455,35 @@ jobs:
455455 # numba package at collection time, which cuSIMT intentionally does
456456 # not depend on. See NVIDIA/numba-cuda-mlir#136.
457457 #
458- # Deselects observed to fail on linux-64 only:
459- # - TestCudaArrayInterface::*: serial-pytest contamination of
460- # numba_cuda_mlir.cuda.cudadrv from an xfailed test in
461- # test_nrt_comprehensive.py. Upstream CI hides it via
462- # `-n auto --dist loadscope`. See NVIDIA/numba-cuda-mlir#135.
463- # - TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn:
464- # subprocess-invokes `cuobjdump`, which is not on PATH in the
465- # base ubuntu:24.04 container. Windows runners ship cuobjdump
466- # with the local CTK, so this doesn't repro there.
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. Upstream CI hides it via
467+ # `-n auto --dist loadscope`.
468+ #
469+ # test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn:
470+ # subprocess-invokes `cuobjdump`, not on PATH in the base
471+ # ubuntu:24.04 container. (No upstream fix yet — pending a
472+ # skip-guard bug to be filed against NVIDIA/numba-cuda-mlir.)
473+ DESELECTS+=(
474+ --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync'
475+ --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync'
476+ --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync'
477+ --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync'
478+ --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams'
479+ --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous'
480+ --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn'
481+ )
482+ fi
467483 pytest -rxXs -v --durations=0 \
468484 --ignore=tests/benchmarks \
469485 --ignore=tests/doc_examples \
470- --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_no_sync' \
471- --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_consume_sync' \
472- --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_no_sync' \
473- --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync' \
474- --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_launch_sync_two_streams' \
475- --deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous' \
476- --deselect 'tests/numba_cuda_tests/cudadrv/test_nvjitlink.py::TestLinkerDumpAssembly::test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn' \
486+ "${DESELECTS[@]}" \
477487 tests/
478488 popd
479489
@@ -496,10 +506,18 @@ jobs:
496506 # patterns that pytest 9.1 rejects; the main-side fix (#2212) has
497507 # not yet shipped in a cuda-core release.
498508 pip install "pytest<9.1"
499- # NvlinkVersion: expected drift on this mode. main cuda-bindings
500- # adds NvlinkVersion.VERSION_6_0 which v1.0.1's wrapper mapping
501- # predates. Fails on both platforms.
509+ # Version-gated deselect: drops automatically when a newer
510+ # cuda-core release with the wrapper-mapping update ships.
511+ DESELECTS=()
512+ 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
513+ # NvlinkVersion: v1.0.1's wrapper mapping predates
514+ # NvlinkVersion.VERSION_6_0 which main cuda-bindings adds.
515+ # Expected drift on this mode until released cuda-core catches up.
516+ DESELECTS+=(
517+ --deselect 'tests/test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]'
518+ )
519+ fi
502520 pytest -rxXs -v --durations=0 --randomly-dont-reorganize \
503- --deselect 'tests/test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]' \
521+ "${DESELECTS[@]}" \
504522 tests/
505523 popd
0 commit comments