Repository navigation
Conversation
…ws ARM64 CUDA libraries
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This branch was successfully deployed
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.
Summary
Three fixes to the prebuilt bundles, each measured or traced on real artifacts:
The ROCm flags, ROCm index and libraries, and ARM64 toolkit follow upstream or lemonade-sdk; the dependency checks and shipping the ARM64 CUDA DLLs inside the bundle are new.
1. ROCm CPU backend
-DCMAKE_SYSTEM_NAMEtogether with-DCMAKE_CROSSCOMPILING=ONleavesCMAKE_SYSTEM_PROCESSORempty. ggml then reportsGGML_SYSTEM_ARCH: UNKNOWNand buildsggml-cpuwith-DGGML_CPU_GENERICin every ROCm leg's nightly logs.llama.cpp enables
--fitby default, so this affects MoE models whose expert weights overflow VRAM onto the CPU.Measured on a Ryzen AI MAX+ 395 (gfx1151, Linux). Source is upstream b11139, the ROCm toolchain is the same, and arms were run interleaved:
With every layer on the GPU the two builds are identical (8B generation 42.4 vs 42.5 t/s). The published Windows gfx1151 zip shows the same loss on its CPU path (30B-A3B CPU-only generation 24.5 t/s vs 41.2 t/s for our windows-x64-cpu zip on the same machine).
The fix drops both flags and enables
GGML_BACKEND_DLandGGML_CPU_ALL_VARIANTS, matching upstream's Linux ROCm release. Dropping the flags alone restores generation speed but imposes an AVX2 baseline, breaking pre-AVX2 CPUs. Runtime variant selection preserves compatibility and improves CPU prompt speed (153 t/s with AVX2 vs 230 t/s with zen4).BACKEND_DLmakesggml-hipa loadable module alongsideggml-cpu-*. Studio's existing ROCm health-check globs match this layout.2. ROCm toolchain refresh
rocm.nightlies.amd.com/tarball-multi-archhas not published anything after 10.1.0a20260822 for any of the 14 target and OS combinations. AMD now publishes tonightly.repo.amd.com/rocm/core/tarball(10.2.0a20260924 at the time of writing, same file naming). lemonade-sdk moved in lemonade-sdk/llamacpp-rocm#141.In 10.2,
libhipblasltdepends on a newlibtensilelite-host, which on Linux in turn needs the unversionedllvm/lib/libomp.so.rocblasimportslibhipblaslt, so the whole HIP backend depends on them. I built bundles with the copy list from this workflow and ran them in a cleanubuntu:24.04container on gfx1151:libtensilelite-host.so.1not foundlibomp.sonot foundOn Windows, the shipped gfx1151 zip with the 10.2 DLLs from the current list exits with
0xC0000135(DLL not found) and runs oncelibtensilelite-host.dllis added. This matches lemonade-sdk/llamacpp-rocm#146.Changes:
libtensilelite-host.so*andllvm/lib/libomp.so; Windows copieslibtensilelite-host.dll.lddwithLD_LIBRARY_PATHunset and rejects missing dependencies or paths outside the bundle, except glibc, libstdc++ and libgcc_s. This prevents runner-installed libraries from hiding omissions.pefileto reject imports of DLLs present in TheRock'sbindirectory but absent from the bundle.The refresh itself does not change speed: on gfx1151, 10.1.0a20260822, 10.2.0a20260924 and the stable 10.0.0 release are within 1.5% of each other on Qwen3-8B and Qwen3-30B-A3B.
3. Windows ARM64 CUDA runtime
app-...-windows-arm64-cuda13-portable.zipshipsggml-cuda.dll, which importscublas64_13.dll, but the zip contains no CUDA runtime DLLs.package_bundle.pyleaves the runtime out on purpose because the installer pairs x64 bundles with the user's PyTorch. download.pytorch.org has no win_arm64 wheels for cu128, cu129, cu130 or cu132, and Studio only pairs a runtime archive with upstreamllama-assets. So on a Windows ARM64 machine without a CUDA toolkit, the CUDA backend cannot load and ggml runs on the CPU.Changes:
cudart64_13.dll,cublas64_13.dllandcublasLt64_13.dllfrombin\arm64are copied into the bundle input.package_bundle.pykeeps them whenBUNDLE_CUDA_RUNTIME=1. Only this leg sets it, so every other bundle is unchanged.Not changed
Verification
run:blocks from this branch inubuntu:22.04:libtensilelite-host, and rejects either it orlibomp.soresolving from a system library directory. A plainnot foundcheck misses the latter case.libggml-hip.soand thealderlakeCPU variant on an Intel host.package_bundle.pyrun locally on a Windows-layout input with and withoutBUNDLE_CUDA_RUNTIME=1: the zip gains exactly the three runtime DLLs, and is unchanged without the flag.actionlint,check_workflow_scalars.py,check_workflow_triggers.pyandcheck_workflow_outputs.pypass.Not verified: