Skip to content

restore: Ascend graph support from #1345 - #1425

Merged
wooway777 merged 1 commit into
mainfrom
restore/pr-1345-ascend-graph
Jul 28, 2026
Merged

restore: Ascend graph support from #1345#1425
wooway777 merged 1 commit into
mainfrom
restore/pr-1345-ascend-graph

Conversation

@wooway777

Copy link
Copy Markdown
Collaborator

Restores the changes from #1345, which were lost after the main history was rewritten on 2026-07-03.

Original PR: #1345
Original commit: b187f9797c9ae832f5f4c21839b0ca15f2b115c0
Restored commit: e00fb056

This restores:

  • Explicit initialization of DeviceGraph handles to nullptr.
  • Ascend graph capture, execution, and destruction through ACL ModelRI.

基于 ACL ModelRI 在昇腾 Ascend 上实现graph特性。

修改内容:
1、/src/infinirt/ascend/infinirt_ascend.cc:将原先返回 DEVICE_TYPE_NOT_SUPPORTED 的桩函数替换为基于 aclmdlRICaptureBegin/aclmdlRICaptureEnd/aclmdlRIDestroy/aclmdlRIExecuteAsync 的完整实现;
2、/src/infinicore/graph/ascend/graph.cc:DeviceGraph 构造函数增加 graph/exec/node 的 nullptr 显式初始化,防止未初始化指针导致的未定义行为。

现状:当前实现可通过/test/infinicore/graph/attention.py用例测试,但是与static attn不兼容,不能单独开启用于性能测试,需要依赖paged-attn或者flash-attn。与当前未优化版本的paged-attn一同开启会发生OOM,无法使用,待实现flash-attn。
@wooway777
wooway777 requested a review from a team July 28, 2026 01:43
@wooway777
wooway777 merged commit def85ea into main Jul 28, 2026
10 checks passed
@wooway777
wooway777 deleted the restore/pr-1345-ascend-graph branch July 28, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants