]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
Implement GGML_CPU_ALL_VARIANTS for ARM (llama/14080)
authorChristian Kastner <redacted>
Wed, 11 Jun 2025 19:07:44 +0000 (19:07 +0000)
committerGeorgi Gerganov <redacted>
Wed, 18 Jun 2025 09:40:34 +0000 (12:40 +0300)
commit26c16ad6bd31ab4dd7a9f9b44afc365b9d577509
treeec3c235555339458d4e8830f50956dae469773e6
parent40d0d47cf1acf632c8d51c502555e1eb7f74bded
Implement GGML_CPU_ALL_VARIANTS for ARM (llama/14080)

* ggml-cpu: Factor out feature detection build from x86

* ggml-cpu: Add ARM feature detection and scoring

This is analogous to cpu-feats-x86.cpp. However, to detect compile-time
activation of features, we rely on GGML_USE_<FEAT> which need to be set
in cmake, instead of GGML_<FEAT> that users would set for x86.

This is because on ARM, users specify features with GGML_CPU_ARM_ARCH,
rather than with individual flags.

* ggml-cpu: Implement GGML_CPU_ALL_VARIANTS for ARM

Like x86, however to pass around arch flags within cmake, we use
GGML_INTERNAL_<FEAT> as we don't have GGML_<FEAT>.

Some features are optional, so we may need to build multiple backends
per arch version (armv8.2_1, armv8.2_2, ...), and let the scoring
function sort out which one can be used.

* ggml-cpu: Limit ARM GGML_CPU_ALL_VARIANTS to Linux for now

The other platforms will need their own specific variants.

This also fixes the bug that the the variant-building branch was always
being executed as the else-branch of GGML_NATIVE=OFF. The branch is
moved to an elseif-branch which restores the previous behavior.
ggml/src/CMakeLists.txt
ggml/src/ggml-cpu/CMakeLists.txt
ggml/src/ggml-cpu/arch/arm/cpu-feats.cpp [new file with mode: 0644]