diff --git a/.docker/llama-cpp-build-target.sh b/.docker/llama-cpp-build-target.sh index 177fdc7ad..2aee2e214 100755 --- a/.docker/llama-cpp-build-target.sh +++ b/.docker/llama-cpp-build-target.sh @@ -4,6 +4,17 @@ 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. diff --git a/.docker/turboquant-build-target.sh b/.docker/turboquant-build-target.sh index 054c792d1..8447e9347 100755 --- a/.docker/turboquant-build-target.sh +++ b/.docker/turboquant-build-target.sh @@ -4,6 +4,17 @@ 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 turboquant-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. diff --git a/backend/cpp/llama-cpp/run.sh b/backend/cpp/llama-cpp/run.sh index 3182801f1..4c7ad19c5 100755 --- a/backend/cpp/llama-cpp/run.sh +++ b/backend/cpp/llama-cpp/run.sh @@ -12,10 +12,11 @@ grep -e "flags" /proc/cpuinfo | head -1 BINARY=llama-cpp-fallback -# CPU images and x86 GPU images ship a single llama-cpp-cpu-all built with ggml +# CPU images and most x86 GPU images ship a single llama-cpp-cpu-all built with ggml # CPU_ALL_VARIANTS: ggml's backend registry dlopens the best libggml-cpu-*.so for this # host, so no shell-side AVX probing. GPU arm64 images still ship llama-cpp-fallback -# until their builder toolchains support ggml's complete arm variant matrix. +# until their builder toolchains support ggml's complete arm variant matrix, and so do +# the SYCL images, whose icpx compiler hangs on the sapphirerapids variant. if [ -e "$CURDIR"/llama-cpp-cpu-all ]; then BINARY=llama-cpp-cpu-all fi diff --git a/backend/cpp/turboquant/run.sh b/backend/cpp/turboquant/run.sh index 607a6f061..44f1f942f 100755 --- a/backend/cpp/turboquant/run.sh +++ b/backend/cpp/turboquant/run.sh @@ -12,11 +12,12 @@ grep -e "flags" /proc/cpuinfo | head -1 BINARY=turboquant-fallback -# CPU images and x86 GPU images ship a single turboquant-cpu-all built with ggml +# CPU images and most x86 GPU images ship a single turboquant-cpu-all built with ggml # CPU_ALL_VARIANTS: ggml's # backend registry dlopens the best libggml-cpu-*.so for this host, so no shell-side # probing. GPU arm64 images still ship turboquant-fallback until their builder toolchains -# support ggml's complete arm variant matrix. +# support ggml's complete arm variant matrix, and so do the SYCL images, whose icpx +# compiler hangs on the sapphirerapids variant. if [ -e "$CURDIR"/turboquant-cpu-all ]; then BINARY=turboquant-cpu-all fi diff --git a/scripts/build/llama-cpp-build-target_test.sh b/scripts/build/llama-cpp-build-target_test.sh index 3d3970b55..bd39bfc83 100755 --- a/scripts/build/llama-cpp-build-target_test.sh +++ b/scripts/build/llama-cpp-build-target_test.sh @@ -23,4 +23,10 @@ assert_target amd64 "" llama-cpp-cpu-all assert_target arm64 cublas llama-cpp-fallback assert_target arm64 "" llama-cpp-cpu-all +# SYCL builds the whole tree with icpx -fsycl, and icpx never finishes +# ggml-cpu/arch/x86/repack.cpp at -march=sapphirerapids: every sycl job sat on +# that one translation unit until GitHub killed it at its 6h limit. +assert_target amd64 sycl_f16 llama-cpp-fallback +assert_target amd64 sycl_f32 llama-cpp-fallback + echo "PASS: llama.cpp build target preserves CPU variants where supported" diff --git a/scripts/build/turboquant-build-target_test.sh b/scripts/build/turboquant-build-target_test.sh index faebb1d70..c9b8cff3b 100755 --- a/scripts/build/turboquant-build-target_test.sh +++ b/scripts/build/turboquant-build-target_test.sh @@ -23,4 +23,10 @@ assert_target amd64 "" turboquant-cpu-all assert_target arm64 cublas turboquant-fallback assert_target arm64 "" turboquant-cpu-all +# SYCL builds the whole tree with icpx -fsycl, and icpx never finishes +# ggml-cpu/arch/x86/repack.cpp at -march=sapphirerapids: every sycl job sat on +# that one translation unit until GitHub killed it at its 6h limit. +assert_target amd64 sycl_f16 turboquant-fallback +assert_target amd64 sycl_f32 turboquant-fallback + echo "PASS: turboquant build target preserves CPU variants where supported"