mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-04 12:22:22 -04:00
fix(llama-cpp): retain CPU variants in GPU builds (#11255)
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 Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7e4a60c701
commit
cedcbf97a9
26
scripts/build/llama-cpp-build-target_test.sh
Executable file
26
scripts/build/llama-cpp-build-target_test.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
CURDIR=$(dirname "$(realpath "$0")")
|
||||
SELECTOR="$CURDIR/../../.docker/llama-cpp-build-target.sh"
|
||||
|
||||
assert_target() {
|
||||
local arch=$1
|
||||
local build_type=$2
|
||||
local expected=$3
|
||||
local actual
|
||||
|
||||
actual=$("$SELECTOR" "$arch" "$build_type")
|
||||
if [ "$actual" != "$expected" ]; then
|
||||
echo "FAIL: $arch/$build_type selected $actual, expected $expected"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_target amd64 cublas llama-cpp-cpu-all
|
||||
assert_target amd64 vulkan llama-cpp-cpu-all
|
||||
assert_target amd64 "" llama-cpp-cpu-all
|
||||
assert_target arm64 cublas llama-cpp-fallback
|
||||
assert_target arm64 "" llama-cpp-cpu-all
|
||||
|
||||
echo "PASS: llama.cpp build target preserves CPU variants where supported"
|
||||
Reference in New Issue
Block a user