已合并
【bugfix】修复mindspore低版本兼容性问题 #947
curry808创建于 8 天前
【bugfix】修复mindspore低版本兼容性问题 #947
已合并
curry808创建于 8 天前
curry808成员
8 天前

【bugfix】修复mindspore低版本兼容性问题

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 curry808 的贡献)
atomgit-bot
atomgit-bot
8 天前 评论:

变更摘要

此 PR 修复了 msprobe 工具在 MindSpore 低版本(2.5 ≤ version < 2.9.0)下的兼容性问题。在 JitDump.grad 方法中,原有逻辑对 MindSpore >= 2.5 的所有版本统一从 args[0] 提取 has_aux 参数透传,但 2.9.0 之前的调用方并不会将 has_aux 作为参数传入,导致参数传递错误。此次修改引入版本号 2.9.0 作为分界点,对 [2.5, 2.9.0) 区间的版本硬编码 has_aux=False,仅对 >= 2.9.0 的版本从 args 中提取该参数。

主要改动

  • 版本分界调整:在 jit_dump.pyJitDump.grad 方法中,将原先单一的 >= 2.5 版本判断细化为 >= 2.9.0>= 2.5(即 [2.5, 2.9.0))两个分支,以区分不同版本对 has_aux 参数的传入方式。
  • 低版本 has_aux 硬编码:对于 MindSpore 版本在 2.5 到 2.9.0 之间的场景,has_aux 不再从 args[0] 读取,而是直接固定传入 False,避免因调用方未传入该参数而导致取值异常。
  • 高版本行为不变:对于 MindSpore >= 2.9.0 的版本,保持原有逻辑,继续从 args[0] 中提取 has_aux 并透传给底层 _executor.grad
likedislike
atomgit-bot
atomgit-bot
8 天前 评论:

代码审查

✅ 未发现问题

likedislike
ascend-robotascend-robot成员
8 天前 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
8 天前 评论:

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
repo-Ascend/msprobe zderry, mnhdxnh (2/2) zderry (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了68条消息 查看更多
Ccurry808成员
7 天前 删除了关联的issue:[Bug]: MindSpore 2.10版本使用dump工具报错
Ccurry808成员
7 天前 关联了issue:[Bug]: MindSpore 2.10版本使用dump工具报错
fuyong
fuyong成员
7 天前 评论:

/check-pr

likedislike
ascend-robotascend-robot成员
7 天前 合入了pull request
xzm123成员
7 天前 评论:

🤖 AIDD 文档质量检测报告

PR #947 已关闭,相关检测任务已归档。

评论由 AIDD 自动生成。

likedislike