From 10e22bd8a819167c684efbabec139d887fc675ac Mon Sep 17 00:00:00 2001 From: bri-prism <288398250+bri-prism@users.noreply.github.com> Date: Fri, 25 Sep 2026 09:40:59 -0700 Subject: [PATCH] release: ship CPU backend variants in the CUDA and HIP bundles (#241) The Windows CUDA x64, Linux CUDA and Windows HIP release jobs build with GGML_NATIVE=OFF but without GGML_BACKEND_DL/GGML_CPU_ALL_VARIANTS. With native detection off and no explicit ISA flags, ggml enables AVX/AVX2/FMA/F16C by default, so each bundle ships a single AVX2-only ggml-cpu library. On a CPU without AVX2 the process dies at startup with no message: even `llama-server --version` exits silently (#241). The CPU and Vulkan bundles already build every variant and pick one at runtime (Vulkan since #198). Build those three bundles with GGML_BACKEND_DL=ON and GGML_CPU_ALL_VARIANTS=ON as well. The arm64 CUDA leg already used BACKEND_DL with GGML_CPU=OFF and is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012Q6ecxozUXFFFLE3N2SMiR --- .github/workflows/release-prism.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-prism.yml b/.github/workflows/release-prism.yml index ff4d09584d1e..3945c94a731b 100644 --- a/.github/workflows/release-prism.yml +++ b/.github/workflows/release-prism.yml @@ -178,6 +178,8 @@ jobs: -DCMAKE_INSTALL_RPATH='$ORIGIN' \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -DGGML_NATIVE=OFF \ + -DGGML_BACKEND_DL=ON \ + -DGGML_CPU_ALL_VARIANTS=ON \ -DGGML_CUDA=ON \ ${{ env.CMAKE_ARGS }} cmake --build build --config Release -j $(nproc) 2>&1 | grep -v "^nvcc warning" @@ -301,10 +303,14 @@ jobs: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }} rem arm64: ggml-cpu refuses MSVC for ARM (needs clang), so that leg builds only the rem ggml-cuda.dll companion for the BACKEND_DL cpu-arm64 zip, like upstream does. + rem x64: BACKEND_DL + CPU_ALL_VARIANTS so the bundled CPU backend is picked at runtime. + rem GGML_NATIVE=OFF alone compiles one ggml-cpu.dll with AVX2/FMA, which dies silently + rem at startup on CPUs without AVX2 (#241). cmake -S . -B build -G "Ninja Multi-Config" ^ -DGGML_NATIVE=OFF ^ -DGGML_CUDA=ON ^ - ${{ matrix.arch == 'arm64' && '-DGGML_BACKEND_DL=ON -DGGML_CPU=OFF' || '' }} ^ + -DGGML_BACKEND_DL=ON ^ + ${{ matrix.arch == 'arm64' && '-DGGML_CPU=OFF' || '-DGGML_CPU_ALL_VARIANTS=ON' }} ^ -DLLAMA_BUILD_BORINGSSL=ON ^ -DCMAKE_CUDA_FLAGS="-diag-suppress=221" ^ ${{ matrix.defines }} ${{ env.CMAKE_ARGS }} @@ -623,6 +629,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release ` -DGGML_BACKEND_DL=ON ` -DGGML_NATIVE=OFF ` + -DGGML_CPU_ALL_VARIANTS=ON ` -DGGML_OPENMP=OFF ` -DGPU_TARGETS="${{ matrix.gpu_targets }}" ` -DGGML_HIP_ROCWMMA_FATTN=ON `