Skip to content

Commit 01ac84e

Browse files
committed
CI: version-gate the nightly-mode deselects so they auto-clean
Each deselect is now wrapped in a bash conditional keyed on the installed release version. When a newer numba-cuda-mlir or cuda-core release ships with the referenced fix, the nightly picks it up automatically, the guard evaluates false, and the deselect drops — so the tests run against the new release. If they still fail we hear about it loudly rather than silently masking a regression. Current guards: - numba-cuda-mlir #135 tests + cuobjdump TestLinkerDumpAssembly: applied when installed numba-cuda-mlir version <= 0.4.0. - cuda-core NvlinkVersion / rlcompleter opt-out / pinned mempool: applied when installed cuda-core version <= 1.0.1. Structure keeps one conditional block per (mode, platform) with a comment above each deselect explaining the tracking issue.
1 parent 456b5a9 commit 01ac84e

2 files changed

Lines changed: 71 additions & 39 deletions

File tree

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

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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

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

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -434,16 +434,23 @@ jobs:
434434
pushd numba-cuda-mlir-released
435435
pip install --upgrade "pip>=25.1"
436436
pip install --group test
437-
# Deselects observed to fail on win-64 only (subset of the
438-
# NVIDIA/numba-cuda-mlir#135 tests; different serial-pytest
439-
# ordering surfaces different tests on Linux vs Windows).
437+
# Version-gated deselects — dropped automatically when newer
438+
# cuSIMT release ships. See linux step for full rationale.
439+
DESELECTS=()
440+
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
441+
# Subset of NVIDIA/numba-cuda-mlir#135 tests that surface on
442+
# win-64 (different serial-pytest ordering than Linux).
443+
DESELECTS+=(
444+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream'
445+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream'
446+
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync'
447+
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous'
448+
)
449+
fi
440450
pytest -rxXs -v --durations=0 \
441451
--ignore=tests/benchmarks \
442452
--ignore=tests/doc_examples \
443-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_default_stream' \
444-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_no_sync_supplied_stream' \
445-
--deselect 'tests/numba_cuda_tests/cudadrv/test_cuda_array_slicing.py::CudaArraySetting::test_sync' \
446-
--deselect 'tests/numba_cuda_tests/cudapy/test_cuda_array_interface.py::TestCudaArrayInterface::test_fortran_contiguous' \
453+
"${DESELECTS[@]}" \
447454
tests/
448455
popd
449456
@@ -464,18 +471,25 @@ jobs:
464471
# Cap pytest below 9.1 — released cuda-core <=1.0.1 has parametrize
465472
# patterns that pytest 9.1 rejects (see #2212).
466473
pip install "pytest<9.1"
467-
# NvlinkVersion: same expected drift as Linux (bindings adds
468-
# VERSION_6_0 unknown to v1.0.1's wrapper mapping).
469-
# rlcompleter opt-out: env-dependent assertion that only fails on
470-
# Windows MCDM — passes on Linux.
471-
# test_non_managed_resources_report_not_managed[pinned]: same
472-
# MCDM mempool OOM that v1.0.1 already xfails in sibling
473-
# test_pinned_memory_resource_initialization (TODO(#9999)).
474-
# Main fixed the parametrized case via #2139 but v1.0.1 doesn't
475-
# have the fix.
474+
# Version-gated deselects — dropped automatically when a newer
475+
# cuda-core release ships. See linux step for full rationale on
476+
# NvlinkVersion. The Windows-only tests are:
477+
# - test_rlcompleter_patch: env-dependent expectation that
478+
# passes on Linux, fails on Windows MCDM.
479+
# - test_non_managed_resources_report_not_managed[pinned]: same
480+
# MCDM mempool OOM v1.0.1 already xfails in
481+
# test_pinned_memory_resource_initialization (TODO(#9999));
482+
# main fixed the parametrized case via #2139 but v1.0.1 lacks
483+
# the fix.
484+
DESELECTS=()
485+
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
486+
DESELECTS+=(
487+
--deselect 'tests/test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]'
488+
--deselect 'tests/test_rlcompleter_patch.py::test_opt_out_env_var_disables_patch_even_when_interactive'
489+
--deselect 'tests/test_memory.py::test_non_managed_resources_report_not_managed[pinned]'
490+
)
491+
fi
476492
pytest -rxXs -v --durations=0 --randomly-dont-reorganize \
477-
--deselect 'tests/test_enum_coverage.py::test_wrapper_covers_all_binding_members[NvlinkVersion]' \
478-
--deselect 'tests/test_rlcompleter_patch.py::test_opt_out_env_var_disables_patch_even_when_interactive' \
479-
--deselect 'tests/test_memory.py::test_non_managed_resources_report_not_managed[pinned]' \
493+
"${DESELECTS[@]}" \
480494
tests/
481495
popd

0 commit comments

Comments
 (0)