mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-04 12:22:22 -04:00
Since #11255 and #11276 every GPU image also builds ggml's CPU_ALL_VARIANTS matrix, so a partial offload uses the host's SIMD kernels. That works everywhere except SYCL, where the Makefile compiles the whole tree with icpx -fsycl: icpx never finishes ggml-cpu/arch/x86/repack.cpp at -march=sapphirerapids. In run 30765516644 both sycl_f16 and sycl_f32 stopped at that translation unit and sat there for 5h30m with a single compile in flight until GitHub killed the job at its 6h limit, and turboquant's f16 job lost its runner outright. gcc compiles the same file in seconds in the vulkan and CPU jobs of the same run, so the CPU variant matrix is only unbuildable under icpx. Route SYCL back to the portable fallback binary, which is what these images shipped before #11255. run.sh already prefers *-cpu-all when present and falls back otherwise, so nothing else has to change. Assisted-by: Claude Code:claude-opus-5[1m] [Read] [Edit] [Bash] Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
26 lines
807 B
Bash
Executable File
26 lines
807 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
arch=${1:?target architecture is required}
|
|
build_type=${2-}
|
|
|
|
# SYCL compiles the whole tree with icpx -fsycl, and icpx never finishes
|
|
# ggml-cpu/arch/x86/repack.cpp at -march=sapphirerapids: the job sits on that one
|
|
# translation unit until GitHub kills it at 6h. gcc builds the same file in
|
|
# seconds, so only the SYCL images have to give up the CPU variant matrix.
|
|
case "$build_type" in
|
|
sycl*)
|
|
echo llama-cpp-fallback
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
# GPU arm64 base images do not consistently provide the gcc-14 toolchain needed
|
|
# to compile ggml's armv9.2 CPU variants. Keep their portable fallback until the
|
|
# builder images can supply that compiler.
|
|
if [ "$arch" = "arm64" ] && [ -n "$build_type" ]; then
|
|
echo llama-cpp-fallback
|
|
else
|
|
echo llama-cpp-cpu-all
|
|
fi
|