Skip to content

Commit e760eb2

Browse files
chore: ⬆️ Update ggml-org/llama.cpp to 3466812d1f06728effe7c0f3c0671117f461672d (mudler#11798)
* ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(llama-cpp): link librdma from the static ggml-rpc build ggml-rpc gained an Apple RDMA transport in this llama.cpp range and declares its librdma dependency with target_link_options(ggml-rpc PRIVATE "LINKER:-weak_library,..."). Link options are not a usage requirement of a static library, so the llama-cpp-grpc variant, which builds with BUILD_SHARED_LIBS=OFF, dropped the flag and left every ibv_* symbol of transport-apple.cpp undefined when grpc-server linked on darwin. prepare.sh now re-declares the same weak link as INTERFACE on the ggml-rpc target, so the flag reaches whoever links the static library. The append is guarded on a marker for repeat runs, and on GGML_RPC_RDMA_APPLE, which the turboquant and bonsai forks lack. Assisted-by: Claude:claude-opus-5 [Claude Code] Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
1 parent aa1f0f8 commit e760eb2

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

backend/cpp/llama-cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
LLAMA_VERSION?=d7bd3bfcad3e29c7e49fd26f38c79ee3e9a3fd6b
2+
LLAMA_VERSION?=3466812d1f06728effe7c0f3c0671117f461672d
33
LLAMA_REPO?=https://github.com/ggerganov/llama.cpp
44

55
CMAKE_ARGS?=

backend/cpp/llama-cpp/prepare.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ if [ -d "patches" ]; then
1515
done
1616
fi
1717

18+
## Apple RDMA link fixup.
19+
20+
## ggml-rpc hands Apple's librdma to the linker with
21+
## target_link_options(ggml-rpc PRIVATE "LINKER:-weak_library,..."). Link options are not
22+
## a usage requirement of a static library, so in our BUILD_SHARED_LIBS=OFF build the flag
23+
## dies with libggml-rpc.a and every ibv_* symbol transport-apple.cpp reaches for comes out
24+
## undefined when grpc-server and ggml-rpc-server link. Re-declare the same weak link as
25+
## INTERFACE so it travels to whoever links the static library.
26+
##
27+
## Guarded on the marker so a second prepare.sh over the same checkout is a no-op, and on
28+
## GGML_RPC_RDMA_APPLE so forks that branched before the Apple RDMA transport (turboquant,
29+
## bonsai) are left alone.
30+
RPC_CMAKE=llama.cpp/ggml/src/ggml-rpc/CMakeLists.txt
31+
if [ -f "$RPC_CMAKE" ] && grep -q "GGML_RPC_RDMA_APPLE" "$RPC_CMAKE" && ! grep -q "LOCALAI_RDMA_IFACE" "$RPC_CMAKE"; then
32+
echo "==> ggml-rpc carries the Apple RDMA transport, re-declaring its weak librdma link as INTERFACE"
33+
cat >> "$RPC_CMAKE" <<'EOF'
34+
35+
# LOCALAI_RDMA_IFACE: added by backend/cpp/llama-cpp/prepare.sh
36+
if (GGML_RPC_RDMA AND APPLE AND NOT BUILD_SHARED_LIBS)
37+
target_link_options(ggml-rpc INTERFACE "LINKER:-weak_library,${RDMA_LIB}")
38+
endif()
39+
EOF
40+
fi
41+
1842
for file in $(ls llama.cpp/tools/server/); do
1943
cp -rfv llama.cpp/tools/server/$file llama.cpp/tools/grpc-server/
2044
done

0 commit comments

Comments
 (0)