已合并
fix: unskip test_reductions test case in test_multiprocessing_api.py #37694
fix: unskip test_reductions test case in test_multiprocessing_api.py #37694
已合并
wuyouqi1创建于 6月5日
wuyouqi1
wuyouqi1成员
6月5日

【合入来源】

【修改方案】

  1. test/test_multiprocessing_api.py 中 test_reductions 用例在验证 NPU tensor 时,调用了 reduce_tensor + rebuild_npu_tensor 进行同进程内重建比较。
  2. rebuild_npu_tensor 内部通过 aclIpcOpenMemHandle/aclIpcOpenEventHandle 导入 IPC handle,该机制设计用于跨进程共享 NPU 内存,同进程内 import 会触发驱动错误(drvRetCode=17),导致用例失败。
  3. 将 NPU tensor 重建验证改为跨进程方式:主进程 reduce_tensor 导出 handle,通过 Queue 传给子进程,子进程 rebuild_npu_tensor 重建后返回数据,主进程比较。子进程返回 .tolist() 避免 resource_sharer 连接断开问题。
  4. 删除原有 @unittest.skip 装饰器,改为 @unittest.skipUnless(get_cann_version(module="DRIVER") >= "25.3.rc1", ...) 条件跳过。NPU IPC reduce/rebuild 依赖 driver >= 25.3.rc1,低版本 driver 自动跳过该用例。

【资料变更】

不涉及

【接口变更】

不涉及

【功能验证】

  • 测试场景:test_multiprocessing_api.py 中 test_reductions 用例
  • 测试方法:pytest 单元测试
  • 验证结果:PASS

【CheckList】

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 wuyouqi1 的贡献)
wuyouqi1wuyouqi1成员
6月5日 创建了 pull request,commit 7da2a951
ascend-robotascend-robot成员
6月5日 添加了label:stat/needs-squash
ascend-robotascend-robot成员
6月5日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
6月5日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
test wanglijun55, liujunzhu (2/2) liujunzhu (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

wuyouqi1, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robot
ascend-robot成员
6月5日 评论:

当前仓库存在以下 保护分支

Protected Branch Version Release
master
v2.10.0
v2.9.0
v2.7.1
v2.11.0
v2.12.0
ci-test
sync-pr28113--to-v2.9.0

评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作

注意:

  1. /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
  2. 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭
likedislike
wuyouqi1wuyouqi1成员
6月5日 修改标题为 “fix: unskip test_reductions test case in test_multiprocessing_api.py”,原标题为“test(reductions): add cross-process rebuild and skipUnless for driver version check”
ascend-robot
ascend-robot成员
6月5日 评论:

Ascend docs pipeline is running...

likedislike
ascend-robotascend-robot成员
6月5日 添加了label:docs-ci-pipeline-running
wuyouqi1wuyouqi1成员
6月5日 修改了pull request 的描述
wuyouqi1
wuyouqi1成员
6月5日 评论:

compile

likedislike
ascend-robotascend-robot成员
6月5日 添加了label:ci-pipeline-running
ascend-robot
ascend-robot成员
6月5日 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
ascend-robotascend-robot成员
6月5日 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
6月5日 添加了label:docs-ci-pipeline-success
ascend-robot
ascend-robot成员
6月5日 评论:

Ascend docs pipeline is running...

likedislike
ascend-robotascend-robot成员
6月5日 删除了label:docs-ci-pipeline-success
ascend-robotascend-robot成员
6月5日 添加了label:docs-ci-pipeline-running
ascend-robot
ascend-robot成员
6月5日 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
ascend-robotascend-robot成员
6月5日 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
6月5日 添加了label:docs-ci-pipeline-success
ascend-robotascend-robot成员
6月5日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
6月5日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
6月5日 评论:
流水线 PR-pipeline_pytorch#29925 [ commitID:04934dca ] 已完成
阶段 任务名 状态 详情
编译构建 Build_X86 >>>
Build_ARM >>>
Build_LibTorch_x86 >>>
Build_LibTorch_ARM >>>
Build_X86_torchair 🛑 >>>
Build_ARM_torchair 🛑 >>>
patch_test 🛑 >>>
恶意代码检查 Antipoison >>>
编码安全与规范检查 CodeCheck >>>
check_error >>>
CodeCheck_lintrunner >>>
开源片段检查 SCA >>>
开发者测试 UT_X86_Part_01 🛑 >>>
UT_X86_Part_02 🛑 >>>
UT_ARM_A3_Part_01 🛑 >>>
UT_ARM_A3_Part_02 🛑 >>>
UT_ARM_A2_Part_01 >>>
UT_ARM_A2_Part_02 >>>
UT_ARM_A2_Part_03 >>>
UT_inductor_Part_01 🛑 >>>
UT_inductor_Part_02 🛑 >>>
UT_inductor_Part_03 🛑 >>>
UT_inductor_Part_04 🛑 >>>
UT_DIST_ARM_Part_01 🛑 >>>
UT_DIST_ARM_Part_02 🛑 >>>
UT_DIST_ARM_Part_03 🛑 >>>
UT_DIST_ARM_Part_04 🛑 >>>
UT_ARM_A2_Select_Part_01 >>>
UT_ARM_A2_Select_Part_02 >>>
流水线 PR-pipeline_pytorch >>>
likedislike
liujunzhu
liujunzhu成员
6月5日 评论:

/approve

likedislike
ascend-robotascend-robot成员
6月5日 添加了label:approved
wanglijun55成员
6月5日 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
6月5日 添加了label:lgtm
ascend-robotascend-robot成员
6月5日 合入了pull request
ascend-robot
ascend-robot成员
6月5日 评论:
流水线 pytorch_gitcode_PR_multiVersion#10082 [ commitID:04934dca ] 已完成
likedislike