Skip to content

fix graph on ascend#1345

Open
ShaneWoof wants to merge 1 commit into
InfiniTensor:mainfrom
ShaneWoof:fix-ascend-graph
Open

fix graph on ascend#1345
ShaneWoof wants to merge 1 commit into
InfiniTensor:mainfrom
ShaneWoof:fix-ascend-graph

Conversation

@ShaneWoof

Copy link
Copy Markdown
Contributor

基于 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 显式初始化,防止未初始化指针导致的未定义行为。

现状:
1、当前实现可通过/test/infinicore/graph/attention.py用例测试:
d45fb2f2-ac7d-44fe-b671-9c8aed8ef8a3
2、与static attn不兼容,不能单独开启用于性能测试,需要依赖paged-attn或者flash-attn。与当前未优化版本的paged-attn一同开启会发生OOM,无法使用,待实现flash-attn:
28aa1386-c45f-4f29-92e9-2f926e73e57a

基于 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。
@ShaneWoof ShaneWoof requested a review from a team June 27, 2026 08:06
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.

1 participant