已合并
fix: defer ACLGraph update until after checkpoint #39072
luochao60创建于 6月23日
fix: defer ACLGraph update until after checkpoint #39072
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 luochao60 的贡献)ascend-robot
6月23日 评论:
6月23日 评论:
Ascend docs pipeline is running...


6月23日 添加了label:docs-ci-pipeline-running
此处折叠了146条消息 查看更多
6月25日 添加了label:ci-pipeline-passed
ascend-robot
6月25日 评论:
6月25日 评论:
流水线 PR-pipeline_pytorch#39016 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | 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 | ✅ | >>> |


6月25日 合入了pull request
ascend-robot
6月25日 评论:
6月25日 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


ascend-robot
6月25日 评论:
6月25日 评论:
流水线 pytorch_gitcode_PR_multiVersion#11309 [ commitID:5d5c8498 ] 已完成


【合入来源】
【修改方案】
torch_npu/npu/_graph_tree.py中 ACLGraph update 的 record 流程:在 capture 前只解析aclgraph_update_plan得到 CPU update payload,不再通过list(inputs)持有 recording private-pool Tensor;capture 后完成输出记录和 checkpoint 相关流程,并在 ACLGraph update 前校验 graph dispatch records,避免 checkpoint 前引入 update_stream 相关 event。new_inputsresolve update payload,再更新 ACLGraph records,随后执行输入 copy 与 graph replay;update payload 为 CPU 侧参数,不依赖 replay 输入数据 copy 后的内容。torch_npu/npu/_aclgraph_update_plan/resolver.py内部接口:update_aclgraph_records_for_graph只接收已解析的cpu_update_input和 graph,删除冗余的prepare_aclgraph_update_input_for_graph/submit_aclgraph_update_input_for_graph导出。【资料变更】
不涉及
【接口变更】
不涉及客户面接口变更;仅调整
torch_npu.npu._aclgraph_update_plan私有模块内部函数组织。【功能验证】
已在各版本 fix 分支执行基础静态验证:
python -m py_compile torch_npu/npu/_aclgraph_update_plan/resolver.py torch_npu/npu/_aclgraph_update_plan/__init__.py torch_npu/npu/_graph_tree.py git diff --check HEAD^ HEAD -- torch_npu/npu/_aclgraph_update_plan/resolver.py torch_npu/npu/_aclgraph_update_plan/__init__.py torch_npu/npu/_graph_tree.py grep -R -n "prepare_aclgraph_update_input_for_graph\|submit_aclgraph_update_input_for_graph" torch_npu/npu/_aclgraph_update_plan torch_npu/npu/_graph_tree.py --exclude-dir=__pycache__【CheckList】