]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/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>
Mon, 18 Aug 2025 17:30:45 +0000 (20:30 +0300)
commite809e81e697d610745f59147720cd4d603698c71
treee0384192e81a7196c26945d319950f6f0b4952ca
parentd3aab3efde8f9bcb85a2d20147906a411e179dce
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>
ggml/src/ggml-cann/CMakeLists.txt
ggml/src/ggml-cann/common.h
ggml/src/ggml-cann/ggml-cann.cpp