]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
CANN: add support for ACL Graph (llama/15065)
authorChenguang Li <redacted>
Wed, 6 Aug 2025 06:12:42 +0000 (14:12 +0800)
committerGeorgi Gerganov <redacted>
Thu, 14 Aug 2025 11:17:28 +0000 (14:17 +0300)
commitb18234a81829bcc3feb4b5787ca5c0b06e1d41ba
tree9dfec7d3c2f731ee0e6084bc3207191d49a95156
parent3b1451756788f8a18d370630ba74d54b94142100
CANN: add support for ACL Graph (llama/15065)

* feat(cann): add optional support for ACL Graph execution

This commit adds support for executing ggml computational graphs using
Huawei's ACL graph mode via the USE_CANN_GRAPH flag. The support can be
enabled at compile time using the CMake option:

    -DUSE_CANN_GRAPH=ON

By default, ACL graph execution is **disabled**, and the fallback path
uses node-by-node execution.

Key additions:
- CMake option  to toggle graph mode
- Graph capture and execution logic using
- Tensor property matching to determine whether graph update is required
- Safe fallback and logging if the environment variable LLAMA_SET_ROWS
  is unset or invalid

This prepares the backend for performance improvements in repetitive graph
execution scenarios on Ascend devices.

Signed-off-by: noemotiovon <redacted>
* Fix review comments

Signed-off-by: noemotiovon <redacted>
* remane USE_CANN_GRAPH to USE_ACL_GRAPH

Signed-off-by: noemotiovon <redacted>
* fix typo

Signed-off-by: noemotiovon <redacted>
---------

Signed-off-by: noemotiovon <redacted>
src/ggml-cann/CMakeLists.txt
src/ggml-cann/common.h
src/ggml-cann/ggml-cann.cpp