已合并
[fix]profiler fix config cache when analyse multi card #39802
hhz0创建于 7月1日
[fix]profiler fix config cache when analyse multi card #39802
已合并
hhz0创建于 7月1日
hhz0
hhz0成员
7月1日

【合入来源】

如有社区issue,请关联issue链接
请勿携带内部流程信息(需求链接、问题单、内部issue等)

https://gitcode.com/Ascend/pytorch/issues/2573

【修改方案】

请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列
如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容)

profiler离线解析设置的max_process_number的值小于总ascend_pt数量时,解析出来db文件的rank与profiler_info.json的rank不一致
这是因为离线解析会复用进程池里的进程,is_load标记位在设置为True后没有修改,被复用,config无法被更新
所以在获取rankid前需要重置is_load标记位

【资料变更】

请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

不涉及

【接口变更】

请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

不涉及

【功能验证】

说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤
新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

修改前,db文件名中的rankid错误
image.png
修改后rankid正确
image.png

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 hhz0 的贡献)
hhz0hhz0成员
7月1日 创建了 pull request,commit 8a463ba5
hhz0hhz0成员
7月1日 关联了issue:[Bug]: 离线解析设置的max_process_number的值小于总ascend_pt数量时,解析出来db文件的rank与profiler_info.json的rank不一致
ascend-robotascend-robot成员
7月1日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
7月1日 评论:

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 陈豪, htchu (2/2) 陈豪, htchu (2/1)
torch_npu/profiler 陈豪, htchu (2/2) 陈豪, htchu (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了72条消息 查看更多
hhz0
hhz0成员
7月3日 评论:

/sync v2.7.1-26.1.0 v2.9.0-26.1.0 v2.10.0-26.1.0 v2.11.0-26.1.0

likedislike
ascend-robot
ascend-robot成员
7月3日 评论:

In response to this:

/sync v2.7.1-26.1.0 v2.9.0-26.1.0 v2.10.0-26.1.0 v2.11.0-26.1.0

@hhz0

同步操作执行结果:

Branch Status Pull Request
v2.7.1-26.1.0 创建同步 PR https://gitcode.com/Ascend/pytorch/merge_requests/39988
v2.9.0-26.1.0 创建同步 PR https://gitcode.com/Ascend/pytorch/merge_requests/39989
v2.10.0-26.1.0 创建同步 PR https://gitcode.com/Ascend/pytorch/merge_requests/39991
v2.11.0-26.1.0 创建同步 PR https://gitcode.com/Ascend/pytorch/merge_requests/39992
likedislike
ascend-robotascend-robot成员
7月7日 added a commit that referenced this pull request
  • ad94fbcf - [sync] PR-39802: [fix]profiler fix config cache when analyse multi card Co-authored-by: hehongzhe<935062458@qq.com> # message auto-generated for no-merge-commit merge: !39988 merge sync-pr39802-jiexi7-to-v2.7.1-26.1.0 into v2.7.1-26.1.0 [sync] PR-39802: [fix]profiler fix config cache when analyse multi card Created-by: ascend-ds-bot Commit-by: hehongzhe Merged-by: ascend-robot Description: ### 1. Origin pull request: https://gitcode.com/Ascend/pytorch/merge_requests/39802 ### 2. Original pull request related issue(s): https://gitcode.com/Ascend/pytorch/issues/2573 ### 3. Original pull request related commit(s): | Sha | Datetime | Message | |---|---|---| |[74141fe8](https://gitcode.com/Ascend/pytorch/commit/74141fe80941316074626dc0f251b0f2c54aed4e)|2026-07-01 19:36:24 +0800 CST|[fix]profiler fix config cache when analyse multi card
    | See merge request: Ascend/pytorch!39988
    • [#39802](https://gitcode.com/Ascend/pytorch/merge_requests/39802)
[Compare with previous version](https://gitcode.com/Ascend/pytorch/merge_requests/39802/diffs?diff_id=6646186&start_sha=c9d6c7092f4c8109d4fdcce6d49b405122f3a5c3
ascend-robotascend-robot成员
7月7日 added a commit that referenced this pull request
  • dc4eeaf4 - [sync] PR-39802: [fix]profiler fix config cache when analyse multi card Co-authored-by: hehongzhe<935062458@qq.com> # message auto-generated for no-merge-commit merge: !39991 merge sync-pr39802-jiexi7-to-v2.10.0-26.1.0 into v2.10.0-26.1.0 [sync] PR-39802: [fix]profiler fix config cache when analyse multi card Created-by: ascend-ds-bot Commit-by: hehongzhe Merged-by: ascend-robot Description: ### 1. Origin pull request: https://gitcode.com/Ascend/pytorch/merge_requests/39802 ### 2. Original pull request related issue(s): https://gitcode.com/Ascend/pytorch/issues/2573 ### 3. Original pull request related commit(s): | Sha | Datetime | Message | |---|---|---| |[74141fe8](https://gitcode.com/Ascend/pytorch/commit/74141fe80941316074626dc0f251b0f2c54aed4e)|2026-07-01 19:36:24 +0800 CST|[fix]profiler fix config cache when analyse multi card
    | See merge request: Ascend/pytorch!39991
    • [#39802](https://gitcode.com/Ascend/pytorch/merge_requests/39802)
[Compare with previous version](https://gitcode.com/Ascend/pytorch/merge_requests/39802/diffs?diff_id=6646186&start_sha=83b5431e04af21c740b5f2f572373095161e489e
ascend-robotascend-robot成员
7月7日 added a commit that referenced this pull request
  • 32328ffe - [sync] PR-39802: [fix]profiler fix config cache when analyse multi card Co-authored-by: hehongzhe<935062458@qq.com> # message auto-generated for no-merge-commit merge: !39992 merge sync-pr39802-jiexi7-to-v2.11.0-26.1.0 into v2.11.0-26.1.0 [sync] PR-39802: [fix]profiler fix config cache when analyse multi card Created-by: ascend-ds-bot Commit-by: hehongzhe Merged-by: ascend-robot Description: ### 1. Origin pull request: https://gitcode.com/Ascend/pytorch/merge_requests/39802 ### 2. Original pull request related issue(s): https://gitcode.com/Ascend/pytorch/issues/2573 ### 3. Original pull request related commit(s): | Sha | Datetime | Message | |---|---|---| |[74141fe8](https://gitcode.com/Ascend/pytorch/commit/74141fe80941316074626dc0f251b0f2c54aed4e)|2026-07-01 19:36:24 +0800 CST|[fix]profiler fix config cache when analyse multi card
    | See merge request: Ascend/pytorch!39992
    • [#39802](https://gitcode.com/Ascend/pytorch/merge_requests/39802)
[Compare with previous version](https://gitcode.com/Ascend/pytorch/merge_requests/39802/diffs?diff_id=6646186&start_sha=a9b821959824d88809a81667a75e2d749845cb94