已合并
[sync] PR-36922: test(npu): add primary context isolation tests #37661
ascend-robot创建于 6月5日
[sync] PR-36922: test(npu): add primary context isolation tests #37661
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 ascend-robot 的贡献)6月5日 创建了 pull request,commit e0d6b801
6月5日 关联了issue:[Usage]:补充_npu_hasPrimaryContext接口测试用例
ascend-robot
6月5日 评论:
6月5日 评论:
6月5日 添加了label:stat/needs-squash
6月5日 添加了label:ascend-cla/yes
ascend-robot
6月5日 评论:
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 | ✅ liujunzhu, wanglijun55 (2/2) | ✅ liujunzhu (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
ascend-ds-bot, thanks for your pull request. All authors of the commits have signed the CLA. 👍


ascend-robot
6月5日 评论:
6月5日 评论:
Ascend docs pipeline is running...


6月5日 添加了label:docs-ci-pipeline-running
ascend-robot
6月5日 评论:
6月5日 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


6月5日 删除了label:docs-ci-pipeline-running
6月5日 添加了label:docs-ci-pipeline-success
wuyouqi1
6月5日 评论:
6月5日 评论:
compile


ascend-robot
6月5日 评论:
6月5日 评论:
Ascend docs pipeline is running...


6月5日 删除了label:docs-ci-pipeline-success
6月5日 添加了label:docs-ci-pipeline-running
ascend-robot
6月5日 评论:
6月5日 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


6月5日 删除了label:docs-ci-pipeline-running
6月5日 添加了label:docs-ci-pipeline-success
wuyouqi1
6月5日 评论:
6月5日 评论:
compile


6月5日 添加了label:ci-pipeline-running
ascend-robot
6月5日 评论:
6月5日 评论:
Ascend docs pipeline is running...


6月5日 删除了label:docs-ci-pipeline-success
6月5日 添加了label:docs-ci-pipeline-running
ascend-robot
6月5日 评论:
6月5日 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


6月5日 删除了label:docs-ci-pipeline-running
6月5日 添加了label:docs-ci-pipeline-success
6月5日 删除了label:ci-pipeline-running
6月5日 添加了label:ci-pipeline-passed
ascend-robot
6月5日 评论:
6月5日 评论:
流水线 PR-pipeline_pytorch#29877 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | 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 | ✅ | >>> |


wanglijun55
6月5日 评论:
6月5日 评论:
/lgtm


liujunzhu
6月5日 评论:
6月5日 评论:
/approve


6月5日 添加了label:approvedlgtm
6月5日 合入了pull request
ascend-robot
6月5日 评论:
6月5日 评论:
流水线 pytorch_gitcode_PR_multiVersion#10040 [ commitID:f0fd59c8 ] 已完成


1. Origin pull request:
https://gitcode.com/Ascend/pytorch/merge_requests/36922
2. Original pull request related issue(s):
https://gitcode.com/Ascend/pytorch/issues/2262
3. Original pull request related commit(s):
Remove diagnostic debug output from test_npu_primary_ctx.py.
Set ACL_OP_INIT_MODE=1 in main block to prevent eager ACL op
initialization from implicitly creating device 0 primary context,
which is the root cause of CI failure (CI sets ACL_OP_INIT_MODE=0).
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
This reverts commit eb1e36319452da71fdbedbeec22bb72d3e9fea1b.
This reverts commit f0a4f1e267c380ea9d74bc4a42a9354b385c1b80.
- test_npu_primary_ctx_swap_order.py: swap hasPrimaryContext(1)/(0) check order
- test_npu_primary_ctx_ctypes.py: ctypes direct call AclrtGetPrimaryCtxState
Add test_npu_primary_ctx.py to verify NPU primary context isolation
across devices, with debug logging for CI environment diagnosis.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com