Skip to content

[BUG]: Numpy 2.4.0 breaks 6 cuda.core tests #1417

@mdboom

Description

@mdboom

Is this a duplicate?

Type of Bug

Something else

Component

cuda.core

Describe the bug

With Numpy 2.4.0, the cuda.core test suite fails on the following tests:

FAILED cuda_core/tests/test_utils.py::TestViewCPU::test_args_viewable_as_strided_memory_cpu[in_arr4] - assert (1,) is None
FAILED cuda_core/tests/test_utils.py::TestViewCPU::test_strided_memory_view_cpu_init[in_arr0] - assert (1,) is None
FAILED cuda_core/tests/test_utils.py::TestViewCPU::test_strided_memory_view_cpu[in_arr0] - assert (1,) is None
FAILED cuda_core/tests/test_utils.py::TestViewCPU::test_args_viewable_as_strided_memory_cpu[in_arr0] - assert (1,) is None
FAILED cuda_core/tests/test_utils.py::TestViewCPU::test_strided_memory_view_cpu_init[in_arr4] - assert (1,) is None
FAILED cuda_core/tests/test_utils.py::TestViewCPU::test_strided_memory_view_cpu[in_arr4] - assert (1,) is None

How to Reproduce

Run the cuda.core tests with Numpy 2.4.0 installed. (Numpy 2.3.5 works).

Expected behavior

Tests pass.

My hunch is that Numpy previously set strides to None when the data was C contiguous, but now it is setting it always. I don't see a Numpy CHANGELOG entry for this, but strides is now readonly, fwiw.

Operating System

All Python versions 3.11 and greater in CI. This tracks, since 3.10 is not supported by Numpy 2.4.0, so there we get an earlier version installed.

nvidia-smi output

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions