已合并
【bugfix】修复mindspore低版本兼容性问题 #947
curry808创建于 8 天前
【bugfix】修复mindspore低版本兼容性问题 #947
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 curry808 的贡献)atomgit-bot
8 天前 评论:
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.py的JitDump.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。


AtlasAccount
8 天前 评论:
8 天前 评论:
atomgit-bot
8 天前 评论:
8 天前 评论:
8 天前 添加了label:ascend-cla/yes
ascend-robot
8 天前 评论:
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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


此处折叠了68条消息 查看更多
fuyong
7 天前 评论:
7 天前 评论:
/check-pr


7 天前 合入了pull request
【bugfix】修复mindspore低版本兼容性问题