fix(llama-cpp): retain CPU variants in GPU builds - #11255
Merged
Conversation
Build the runtime CPU variant set alongside x86 GPU backends so partial offload uses the host's SIMD kernels instead of the scalar fallback. Keep arm64 GPU images on the portable binary until their builders consistently provide gcc-14. Assisted-by: Codex:gpt-5
mudler
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes #11254.
GPU llama.cpp images on x86 now use the existing
llama-cpp-cpu-allbuild target, preserving the selected CUDA/ROCm/Vulkan/SYCL backend while also packaging ggml's runtime-selected CPU kernels for partial offload. GPU arm64 builds remain on the portable fallback because their base images do not consistently provide the gcc-14 toolchain required by ggml's full armv9.2 variant matrix.A focused shell regression test covers the architecture/build-type target selection.
Notes for Reviewers
Verification:
make test-build-scriptsmake test-ci-scripts(41 tests)bash -n .docker/llama-cpp-build-target.sh .docker/llama-cpp-compile.sh scripts/build/llama-cpp-build-target_test.sh backend/cpp/llama-cpp/run.shgit diff --checkA full backend container build was not run locally because it is a long GPU/toolchain matrix build; CI is expected to exercise the affected llama.cpp image variants.
Signed commits