Skip to content

ggml-cpu: skip unsupported ARM ISA variants under GGML_CPU_ALL_VARIANTS - #26103

Open
ninihuang2026 wants to merge 1 commit into
ggml-org:masterfrom
ninihuang2026:fix/arm-cpu-variants-compiler-check
Open

ggml-cpu: skip unsupported ARM ISA variants under GGML_CPU_ALL_VARIANTS#26103
ninihuang2026 wants to merge 1 commit into
ggml-org:masterfrom
ninihuang2026:fix/arm-cpu-variants-compiler-check

Conversation

@ninihuang2026

@ninihuang2026 ninihuang2026 commented Jul 25, 2026

Copy link
Copy Markdown

Overview

When building with GGML_CPU_ALL_VARIANTS, probe the exact -march= string each ARM variant would be built with and skip it if the compiler rejects it, instead of failing the whole build, because not every compiler version supports every ARM ISA extension (e.g. GCC < 14 rejects "+sme").

Additional information

  1. Issue links:
  1. Evidence
    Test env:
    Jetson Orin (Cortex-A78AE, Armv8.2-A, aarch64), Ubuntu 24.04.4 LTS, GCC 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1)

commands:

cmake -S . -B build -DGGML_NATIVE=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON
cmake --build build -j$(nproc)

===before===
cc1plus: error: invalid feature modifier 'sme' in '-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme'
Build exits non-zero, entire GGML_CPU_ALL_VARIANTS build aborts.

===after===

-- Performing Test GGML_CPU_VARIANT_armv9.2_1_SUPPORTED - Failed
-- Skipping CPU backend variant 'armv9.2_1': compiler does not support '-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme'
-- Performing Test GGML_CPU_VARIANT_armv9.2_2_SUPPORTED - Failed
-- Skipping CPU backend variant 'armv9.2_2': compiler does not support '-march=armv9.2-a+dotprod+fp16+sve+i8mm+sve2+sme'

The other 6 ARM variants (armv8.0_1 through armv8.6_2) still probe Success and build with their correct differentiated -march= flags
The full build completes (exit 0) — llama-cli, libllama.so, libggml.so, plus the 6
ggml-cpu-armv8.*.so backend variants.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES. Claude Sonnet suggested the patch and tested and verified the result.

@ninihuang2026
ninihuang2026 requested a review from ggerganov as a code owner July 25, 2026 00:37
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Jul 25, 2026
@ggml-gh-bot

This comment was marked as outdated.

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.

Compile bug: zero-size array ‘gemm_gemv_kernels’ / invalid feature modifier ‘sme’

1 participant