已合并
register_device_interface_for_triton #43622
cuiduo创建于 8月3日
register_device_interface_for_triton #43622
已合并
cuiduo创建于 8月3日
cuiduo
cuiduo成员
8月3日

【合入来源】

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

【修改方案】

image.png
修改上述报错,增加npuinterface注册

【资料变更】

不涉及

【接口变更】

不涉及

【功能验证】

本地验证通过

【CheckList】

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

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 cuiduo 的贡献)
cuiduocuiduo成员
8月3日 创建了 pull request,commit 786e523f
atomgit-bot
atomgit-bot
8月3日 评论:

变更摘要

此 PR 主要修复了 torch_npu 中 Triton 设备兼容性检查的注册流程问题,并清理了测试文件中的未使用导入。核心改动是在 is_device_compatible_with_triton() 函数中增加了对 _dynamo_register_interface_for_device() 的调用,确保在检查设备是否兼容 Triton 之前完成 device interface 的注册;同时移除了 test_torch_mlir.py 中多余的 import torch_npu 语句。

主要改动

  • is_device_compatible_with_triton() 中增加设备接口注册调用:于 torch_npu/utils/_dynamo.pyis_device_compatible_with_triton 函数内部新增 _dynamo_register_interface_for_device() 调用,确保在执行设备兼容性检查前已正确注册对应的 device interface。
  • 移除测试文件中的未使用导入:删除了 test/_inductor/test_torch_mlir.py 中的 import torch_npu 语句,以消除 flake8 F401(未使用导入)警告。
likedislike
atomgit-bot
atomgit-bot
8月3日 评论:

代码审查

✅ 未发现问题

likedislike
ascend-robotascend-robot成员
8月3日 添加了label:ascend-cla/no
此处折叠了46条消息 查看更多
ascend-robotascend-robot成员
29 天前 添加了label:approved
daifu1234567成员
29 天前 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
29 天前 添加了label:lgtm
ascend-robotascend-robot成员
29 天前 合入了pull request
ascend-robot
ascend-robot成员
29 天前 评论:
流水线 pytorch_gitcode_PR_multiVersion#13589 [ commitID:9e13bc06 ] 已完成
likedislike