DLPack-related tests & examples with host-accessible memory are sensitive to NumPy versions
Nobody has claimed this yet.
- Dominant language
- Cython
- Stars
- 3.4k
- Forks
- 329
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 116
Description
Minimal reproducer I just built for nvbugs 5591656:
import numpy as np
from cuda.core.experimental import Device, LegacyPinnedMemoryResource
dev = Device()
dev.set_current()
mr = LegacyPinnedMemoryResource()
buf = mr.allocate(40)
arr = np.from_dlpack(buf).view(np.float32)
arr[:] = 1
This causes ValueError: assignment destination is read-only until NumPy v2.2.5 as Rui from the QA team correctly pointed out.
Previously, we've known NumPy's DLPack support is not as stable as we hoped. Some tests required v2.1.0+ to run. This seems to be a new situation that we did not capture so far, because we let most, if not all, of the test dependencies float.
We should re-evaluate how aggressively we'd like to teach users to use NumPy for host interoperability, and examine all the test-skip conditions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproducer in the issue and locate the DLPack tests and examples covering host-accessible memory. Compare behavior across the NumPy versions mentioned, including the v2.2.5 boundary, then review every existing test-skip condition; done means the affected tests and examples have an explicit, reproducible version policy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100