feat: bump llama.cpp b8772 → b9222 and rebuild all platforms#12
Merged
Conversation
Upstream b9222 splits the legacy libcommon.a into libllama-common.a
and libllama-common-base.a; update CGO LDFLAGS across all platform
build files. Also pick up a new spirv-headers dep for Vulkan and
work around a gcc-13 internal-compiler-error on fattn-mma-f16 /
arg.cpp templates by switching CUDA + Vulkan stages to gcc-12.
Platforms rebuilt against b9222:
- linux-amd64 (CPU, CUDA, Vulkan)
- linux-arm64 (new; cross-compiled via Dockerfile.libs-arm64)
- android-arm64 (NDK r27c)
- darwin-amd64, darwin-arm64
Toolchain changes:
- Dockerfile.libs: ARCH_SUFFIX arg on CPU stage, gcc-12 in
CUDA/Vulkan stages, spirv-headers in Vulkan stage, copy mtmd
headers from tools/mtmd/
- Dockerfile.libs-arm64: new — aarch64-linux-gnu cross-compile
(works in unprivileged LXC where binfmt_misc is read-only)
- Dockerfile.android: copy mtmd headers from tools/mtmd/
- Makefile: new build-libs-linux-arm64 target
Verified via stub + CGO build + tests on linux-amd64 (in sandbox)
and darwin-amd64 (native).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
version.go)libcommon.a→libllama-common.a+libllama-common-base.a(CGO LDFLAGS updated everywhere)linux-arm64build path via aarch64-linux-gnu cross-compileToolchain changes
Dockerfile.libsARCH_SUFFIXbuild-arg on the CPU stage so the same Dockerfile can output linux-amd64 or linux-arm64 pathsgcc-12— gcc-13 hits a reproducible internal-compiler-error onfattn-mma-f16templates (CUDA) andarg.cpp(Vulkan) at b9222spirv-headers(new b9222 dep —ggml-vulkancallsfind_package(SPIRV-Headers))tools/mtmd/(previously the headers were committed manually because the Dockerfile didn't track them)Dockerfile.libs-arm64(new) — aarch64-linux-gnu cross-compile; works in unprivileged LXC wherebinfmt_miscis read-only (so qemu-emulation isn't an option)Dockerfile.android— same mtmd-header fixMakefile— newbuild-libs-linux-arm64targetPlatforms rebuilt
Dockerfile.libsDockerfile.libs(gcc-12)Dockerfile.libs(gcc-12 + spirv-headers)Dockerfile.libs-arm64(cross-compile)Dockerfile.android(NDK r27c)make build-libs)CMAKE_OSX_ARCHITECTURES=arm64)Test plan
CGO_ENABLED=0 go build/test ./ggml/...(stub) — darwin-amd64CGO_ENABLED=1 go build -tags llamacpp ./ggml/llamacpp/...— darwin-amd64CGO_ENABLED=1 go build -tags whispercpp ./ggml/whispercpp/...— darwin-amd64golang:1.24-bookworm+gcc-12)🤖 Generated with Claude Code