Skip to content

kleidiai: Rework KleidiAI Build System/Integration - #26077

Open
JonathanC-ARM wants to merge 2 commits into
ggml-org:masterfrom
JonathanC-ARM:jonclo01/kleidiai_build_rework
Open

kleidiai: Rework KleidiAI Build System/Integration#26077
JonathanC-ARM wants to merge 2 commits into
ggml-org:masterfrom
JonathanC-ARM:jonclo01/kleidiai_build_rework

Conversation

@JonathanC-ARM

@JonathanC-ARM JonathanC-ARM commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR reworks how kleidiai is included into llama.cpp via cmake.
The intent here is to remove the requirement for manually adding kernel source files, -march flags and other things that are specific to the kleidiai library and instead relying on the libraries own CMakeLists.

Various ifdef guards are also removed from ggml/src/ggml-cpu/kleidiai/kernels.cpp which is safe to do as kernel selection will be runtime feature safe from the changes included in PR 1 - #26076

Additional information

This pr is intended to be 2/3 in a series of pr's to improve the KleidiAI with its cpu feature detection, build system and documentation.

PR 1 - #26076
PR 3 - #26078

Requirements

  • I have read and agree with the contributing guidelines - YES
  • AI usage disclosure: YES - Ai was used to help understand llama.cpp

@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Jul 24, 2026
@JonathanC-ARM JonathanC-ARM changed the title kleidiai: kleidiai: Rework KleidiAI Build System/Integration Jul 24, 2026
@ggml-gh-bot

ggml-gh-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

Hi @JonathanC-ARM, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • Multiple open PRs from a new contributor: We limit new contributors (those without a previously merged PR) to 1 open PR at a time. You currently have 2 open PRs.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@JonathanC-ARM

Copy link
Copy Markdown
Contributor Author

Hi @JonathanC-ARM, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

* **Multiple open PRs from a new contributor**: We limit new contributors (those without a previously merged PR) to **1 open PR at a time**. You currently have 2 open PRs.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

This is correct, however the approach here from my part was to give context to a series of work. This pr is draft and is not required to be acted upon and will only be updated and pursued if and when PR 1 in this series is accepted.

Signed-off-by: Jonathan Clohessy <Jonathan.Clohessy@arm.com>
@JonathanC-ARM
JonathanC-ARM force-pushed the jonclo01/kleidiai_build_rework branch from af1ec81 to 6f5914a Compare August 13, 2026 10:17
Signed-off-by: Jonathan Clohessy <Jonathan.Clohessy@arm.com>
@JonathanC-ARM
JonathanC-ARM force-pushed the jonclo01/kleidiai_build_rework branch from 6f5914a to 5c8d80e Compare August 13, 2026 10:18
@JonathanC-ARM
JonathanC-ARM marked this pull request as ready for review August 13, 2026 10:18
@JonathanC-ARM

Copy link
Copy Markdown
Contributor Author

@chaxu01 @taronaeo would it be possible to get a review on this?

@taronaeo

Copy link
Copy Markdown
Member

Lemme look into it the day after tomorrow :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants