已关闭
[Usage]:补充_npu_hasPrimaryContext接口测试用例 #2262
wuyouqi1创建于  6月4日关闭于  6月5日
wuyouqi1
wuyouqi1成员
6月4日 创建

在提交新问题之前,请确保您已经在社区中搜索过相关问题,并使用了社区中提供的资源/工具后,仍未找到满意的解决方式。

环境信息

- 操作系统:Linux 5.10.0 (openEuler 22.03) aarch64
- 昇腾硬件信息:Ascend 910B,2 卡 NPU
- CANN软件版本:9.1.0
- 安装的对应软件版本:PyTorch 2.7.1 + torch_npu (pr_test_primary_ctx 分支)

使用场景及问题

在多卡 NPU 环境下,测试验证仅在 npu:1 上创建 tensor 时,npu:0 不应被意外创建 primary context。该测试在本地环境通过,但在 CI 环境中失败,根因为 CI 脚本 pytorch_ut_dist.sh 全局设置 ACL_OP_INIT_MODE=0,导致 import torch_npu 时 eager 算子初始化在 device 0 上隐式创建了 primary context。

欢迎加入社区,感谢您对社区的贡献 🎉!

likedislike
wuyouqi1wuyouqi1成员
6月4日 添加了label:usage
wuyouqi1wuyouqi1成员
6月4日 修改了issue 的描述
wuyouqi1wuyouqi1成员
6月4日 修改标题为 “[Usage]:补充_npu_hasPrimaryContext接口测试用例”,原标题为“[Usage]: ”
wuyouqi1wuyouqi1成员
6月4日 将 wuyouqi1 设为负责人
ascend-robotascend-robot成员
6月5日 关闭了 issue
ascend-robotascend-robot成员
6月5日 关联了pull request:[sync] PR-36922: test(npu): add primary context isolation tests
ascend-robotascend-robot成员
6月5日 关联了pull request:[sync] PR-36922: test(npu): add primary context isolation tests
ascend-robotascend-robot成员
6月5日 关联了pull request:[sync] PR-36922: test(npu): add primary context isolation tests
ascend-robotascend-robot成员
6月5日 关联了pull request:[sync] PR-36922: test(npu): add primary context isolation tests
ascend-robotascend-robot成员
6月5日 关联了pull request:[sync] PR-36922: test(npu): add primary context isolation tests
ascend-robotascend-robot成员
6月5日 添加了label:resolved