DLPack-related tests & examples with host-accessible memory are sensitive to NumPy versions

未关闭
#1,168 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
numpy, python
领域
testing-qa

调研方向

从 issue 中的最小复现开始,定位涵盖主机可访问内存的 DLPack 测试和示例。比较所提到的各个 NumPy 版本之间的行为,包括 v2.2.5 这一边界,然后检查所有现有的测试跳过条件;当受影响的测试和示例都有明确且可复现的版本策略时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

cuda.core documentation example test

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.

主要语言
Cython
星标
3.4k
派生
329
平均合并
1 天 21 小时
30 天内合并 PR
113

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/cuda-python 的其他 Issue

查看 NVIDIA/cuda-python 的全部 Issue

相似的 Issue

更多 Testing & QA Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。