Merged
fix(torchair): operator.getitem 保持 python原生执行路径,修复 torch2.15 下 converter 拒收报错 #3933
fix(torchair): operator.getitem 保持 python原生执行路径,修复 torch2.15 下 converter 拒收报错 #3933
Merged
陈木氵Add on 23 days ago
陈木氵
陈木氵Collaborators
23 days ago

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

PR功能描述 / 为什么需要这个合入**:

torch 2.15 起 operator.getitem 被注册为 polyfill 并从 trace_rules._builtin_function_ids
移除,_wrap 门控翻转后 getitem 节点落入 converter 分发,因非 OpOverload 被拒收:
普通构图报 "Failed to auto-generated converter ... not an instance of OpOverload",
record_ascend_ir 模式经 mock 路径报 "ge_outputs must be list or a tuple."。

新增 _is_direct_eval_builtin():将 operator.getitem 显式纳入 python原生执行 路径
(对多输出算子的 ValuePack 列表取下标,不产生 GE 节点)。版本比较使用 packaging.version,
不能用字符串比较("2.9" >= "2.15" 按字符串为 True)。torch 2.13/2.15 双版本回归通过。

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #933

希望检视人员了解:

likedislike
Pull Request has been successfully merged by ascend-robot.
(Thank you for 陈木氵's contribution.)
陈木氵陈木氵Collaborators
23 days ago Created pull request, commit 9ad5eb47
atomgit-bot
atomgit-bot
23 days ago Comments:

🤖 AI Code Review

⚠️ 审查未能完成

本次代码审查未能完成,可能是临时性故障。

你可以在评论区输入 /ai summary 重新发起审查。若多次失败,请联系管理员并附上下方追踪 ID。

追踪 ID: task-435072

likedislike
Incorrect?
atomgit-bot
atomgit-bot
23 days ago Comments:

🤖 AI Code Review

⚠️ 审查未能完成

本次代码审查未能完成,可能是临时性故障。

你可以在评论区输入 /ai review 重新发起审查。若多次失败,请联系管理员并附上下方追踪 ID。

追踪 ID: task-435073

likedislike
Incorrect?
ascend-robotascend-robotCollaborators
23 days ago Added label: ascend-cla/yes
ascend-robotascend-robotCollaborators
23 days ago Added label: needs-issue
75 messages are collapsed here。 See more
AtlasAccountAtlasAccountCollaborators
20 days ago Added label: ci-pipeline-passed
ascend-robotascend-robotCollaborators
20 days ago Closed associated issue
ascend-robotascend-robotCollaborators
20 days ago Merged pull request
ascend-robot
ascend-robotCollaborators
20 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robotCollaborators
20 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike