cuda-python icon indicating copy to clipboard operation
cuda-python copied to clipboard

[BUG]: Unblock nightly MLIR tests while awaiting a release containing the ml-dtypes compatibility fix

Open jpascucci-nv opened this issue 1 week ago • 4 comments

Type of Bug

Runtime Error / nightly CI failure

Component

Infrastructure

Describe the bug

The nightly numba-cuda-mlir integration jobs are blocked by a compatibility bug in the released MLIR package. Upstream fixed it in NVIDIA/numba-cuda-mlir#470, merged November 16, 2026, but the latest published GitHub release is still v0.6.0, which does not contain the fix. Our nightly jobs still resolve and install numba-cuda-mlir 0.6.0.

cuda-python does not explicitly pin MLIR to 0.6.0: ci/tools/run-tests installs numba-cuda-mlir[cu${TEST_CUDA_MAJOR}] without a version constraint, reads the installed version, and the workflows check out that version's tag for matching tests. Consequently, the fix on upstream main is not picked up by this release-based integration path.

With ml-dtypes 0.7.0, tests/test_complex.py::test_complex32_local_array_arithmetic fails with:

TypeError: data type 'J' not understood

The same test fails in all four MLIR jobs: Linux and Windows, with CUDA 12.9 and 13.5. Upstream's fix preserves dtype objects during ufunc cast checks instead of reconstructing a custom dtype from its single-character code.

Proposed temporary unblock

Leo says:

We can unblock ourselves for now while waiting for a release. If it can be patched at the pytest-level, the patch can go to .github/workflows/test-wheel-*.yml If it can be patched at the dependency level, the patch can go toci/tools/run-tests

Please evaluate and implement a temporary workaround in cuda-python while waiting for an upstream release containing #470. A dependency-level candidate is constraining ml-dtypes<0.7 for the MLIR jobs; this has not been validated by a separate rerun. Account for the subsequent pip install --group test in both workflows so the test-dependency installation does not undo the workaround. Alternatively, apply a pytest-level compatibility patch in the Linux and Windows test workflows.

The complex32 arithmetic test remains valid; its expected result is unchanged. Remove the temporary workaround once an upstream release containing the fix is available and verified.

CI evidence and timeline

Relevant cuda-python files

Expected behavior

The nightly released-MLIR integration tests pass with a validated temporary compatibility workaround, pending an upstream release containing #470.

Environment

Python 3.12; Linux x86-64 and Windows; NVIDIA RTX PRO 6000 GPUs; CUDA 12.9/13.5 matrix jobs; numba-cuda-mlir 0.6.0, NumPy 2.5.5, ml-dtypes 0.7.0. Full package lists and tracebacks are in the linked CI logs. Findings are based on those logs and upstream source; no local rerun was performed.

jpascucci-nv avatar Nov 23 '26 19:11 jpascucci-nv

@brandon-b-miller / @isVoid : Can you please take a look at this and ensure a fix is shipped in time for the cuda.core-1.4.0 release in December? Thank you.

rparolin avatar Nov 23 '26 20:11 rparolin

To my surprise, v0.6.1 was released yesterday and it should contain the necessary fix. @jpascucci-nv could you monitor the nightly and see if this is fixed now? If so, we can just close and do nothing in this repo.

leofang avatar Nov 25 '26 21:11 leofang

@leofang I'll look at this on Monday.

jpascucci-nv avatar Nov 25 '26 21:11 jpascucci-nv

@isVoid mentioned offline that it's been working: https://github.com/NVIDIA/cuda-python/actions/runs/45532608245/job/138931572752 Closing.

leofang avatar Nov 30 '26 15:11 leofang