已合并
feat(dvm): support A5 and optimizations #34725
SorryNaCN创建于 4月29日
feat(dvm): support A5 and optimizations #34725
已合并
SorryNaCN创建于 4月29日
SorryNaCN
SorryNaCN成员
4月29日

【合入来源】

(如有)请关联需求文档/issue链接

【修改方案】

  1. 更新 third_party/dvm 到 r2.10 分支,并调整 DVM CMake 构建参数,使用 DVM_CUSTOM_FLAGS 引入 ACL 头文件,避免构建时拷贝头文件目录。
  2. DVM Python 侧增加 Ascend950(A5) SoC 判断:950 场景不安装 bf16 promote 包装;matmul 规则在 950 上放宽 inner axis 的 SymInt/MAX_INNER 限制。
  3. 去除 dvm.kernel 的 mfusion 参数,融合 kernel 仍通过 mfusion_dvm_* 命名区分,并同步更新 mfusion README。
  4. DVM lowering 类型检查对 CPU meta 的 fallback 条件与 config.disable_cpp_codegen 对齐,避免不必要 fallback。
  5. full 规则允许 CPU meta,用于支持 full/lift_fresh 相关场景进入 DVM 规则判断。
  6. 适配 DVM r2.10 新增的 ViewStore pybind 接口。

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

【资料变更】

涉及。更新 torch_npu/inductor/mfusion/README.md,说明融合 kernel 不再依赖 dvm.kernel 的 mfusion 参数,而是通过 mfusion_dvm* 命名体现。

【接口变更】

不涉及客户面可见接口变更。内部 dvm.kernel 装饰器移除 mfusion 参数,调用方同步适配。

【功能验证】

  1. 已执行 python3 -m py_compile torch_npu/_inductor/dvm/op_emitter.py。
  2. 已确认 tmp_pta 分支相对 origin/v2.7.1 仅包含 1 个提交。
  3. 已使用 force-with-lease 推送到 sorrynacn/tmp_pta,远端 commit 为 a7f2866c08a5d23c83e8ad04cd3a641bbe11a633。

【CheckList】

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

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 SorryNaCN 的贡献)
SorryNaCNSorryNaCN成员
4月29日 创建了 pull request,commit 7cfd1286
ascend-robotascend-robot成员
4月29日 添加了label:stat/needs-squash
ascend-robot
ascend-robot成员
4月29日 评论:

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/pytorch anyrenwei, adrian07110, zichun_ye (3/2) anyrenwei, adrian07110, zichun_ye (3/1)
torch_npu/_inductor anyrenwei, adrian07110, zichun_ye (3/2) adrian07110, zichun_ye, anyrenwei (3/1)
torch_npu/csrc/inductor zichun_ye, anyrenwei, adrian07110 (3/2) adrian07110, zichun_ye, anyrenwei (3/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
ascend-robotascend-robot成员
4月29日 添加了label:ascend-cla/yes
此处折叠了280条消息 查看更多
ZhihaoLi
ZhihaoLi成员
5月18日 评论:

/approve

likedislike
zichun_ye
zichun_ye成员
5月18日 评论:

/approve

likedislike
ascend-robotascend-robot成员
5月18日 添加了label:lgtm
ascend-robot
ascend-robot成员
5月18日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: zichun_ye, anyrenwei, adrian07110.
Reviewers who wrote a comment of /lgtm are: anyrenwei, adrian07110, zichun_ye.

likedislike
ascend-robotascend-robot成员
5月18日 合入了pull request