Repository navigation
release: ship CPU backend variants in the CUDA and HIP bundles (#241) - #271
Merged
Merged
Conversation
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q6ecxozUXFFFLE3N2SMiR
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The functional changes are consistent with existing release jobs; only a minor comment-format issue remains.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds runtime-selected CPU backend variants to CUDA and HIP release bundles, preventing startup failures on non-AVX2 CPUs.
Changes:
- Enables dynamic CPU backend loading and all CPU variants for Linux CUDA, Windows CUDA x64, and Windows HIP.
- Preserves the Windows CUDA ARM64 GPU-only behavior.
| File | Description |
|---|---|
.github/workflows/release-prism.yml |
Enables compatible CPU variants in GPU release bundles. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.

Fixes #241.
Problem
release-prism.ymlbuilds the Windows CUDA x64, Linux CUDA and Windows HIP bundles withGGML_NATIVE=OFFbut withoutGGML_BACKEND_DL/GGML_CPU_ALL_VARIANTS. With native detection off and no explicit ISA flags, ggml turns on AVX/AVX2/FMA/F16C by default. Each of those bundles therefore ships a single AVX2-only CPU backend, and on a CPU without AVX2 the process dies at startup with no message. In #241, evenllama-server --versionexits silently.This is confirmed in the shipped
prism-b10709-9a9394aartifacts:win-cpu-x64ggml-cpu-x64…-zen4)win-vulkan-x64win-cuda-13.3-x64ggml-cpu.dllymmops, 458vfmadd, 91 AVX2-only permutes/broadcastswin-hip-radeon-x64ggml-cpu.dllvfmadd, 2,004 AVX2-only opslinux-cuda-*-x64libggml-cpu.soFor comparison,
ggml-cpu-x64.dllandggml-cpu-sse42.dllin the CPU zip contain 0vfmaddand 0 AVX2-only ops.Fix
Add
-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ONto those three jobs, as the CPU and Vulkan bundles already do. The arm64 CUDA leg already usedBACKEND_DLwithGGML_CPU=OFFand is unchanged.Verification (local, Windows)
I have no CUDA toolkit on this machine, so I verified the CPU side of the Windows CUDA job's configuration with the same flags and the same shared
CMAKE_ARGS, minusGGML_CUDA. MSVC 19.44,-DGGML_NATIVE=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON, onprism@842b18804:x64,sse42,sandybridge,haswell,alderlake,skylakex,cannonlake,cascadelake,icelake. They also build withLLAMA_FATAL_WARNINGS=ON(/WX), so the non-AVX2 x86 tiers that broke in ggml-cpu : fix PQ2_0 x86 vec_dot build on non-AVX2 CPU variants #263 are clean under MSVC now. With/WXthe only failures are pre-existing and unrelated:src/llama.cppC4297 and an STL C4244. None of these jobs set fatal warnings.llama-server --versionruns.llama-serveron a Core Ultra X7 358H (AVX2 + AVX-VNNI) mapsggml-cpu-alderlake.dll. A CPU without AVX2 takes the same scoring path down tosse42/x64, as the CPU zip already does for the Misc. bug: not start on Windows with CUDA #241 reporter ("only CPU version … work right").Not verified here: the CUDA and HIP legs themselves (no toolkit on this box), and the Linux CUDA leg's GCC variant build. A CI run of
release-prism.ymlon this branch is the real check.🤖 Generated with Claude Code
https://claude.ai/code/session_012Q6ecxozUXFFFLE3N2SMiR