Skip to content

Commit 337acc4

Browse files
localai-botmudler
andauthored
chore: ⬆️ Update antirez/ds4 to c463029c205c2ec8d7ab6c0df4a3f52979091286 (#10189)
* ⬆️ Update antirez/ds4 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(ds4): link ds4_ssd.o into the backend build Upstream antirez/ds4 splits the SSD expert-cache into its own ds4_ssd.c translation unit, whose symbols (ds4_ssd_memory_lock_acquire/release, ds4_ssd_cache_experts_for_byte_budget, ds4_ssd_auto_cache_plan) are referenced by ds4.c/ds4_cpu.o. The dependency-bump automation regenerated this branch from clean master and dropped the prior linkage fix, so the cpu-ds4 / cublas-ds4 backend builds fail again with undefined references. Re-apply the ds4_ssd.o linkage GPU-agnostically (mirroring ds4_distributed.o) in both the backend Makefile (DS4_OBJ_TARGET + the engine-object build rule for every GPU mode) and CMakeLists.txt (list(APPEND DS4_OBJS ds4_ssd.o)). Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:opus-4.8 [Claude Code] --------- 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 618e90c commit 337acc4

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

backend/cpp/ds4/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ elseif(DS4_GPU STREQUAL "cpu")
6060
set(DS4_OBJS "${DS4_DIR}/ds4_cpu.o")
6161
endif()
6262

63-
# ds4.c now references ds4_distributed.c (distributed inference was split into
64-
# its own translation unit upstream). It is a single GPU-agnostic object shared
65-
# by every GPU mode, so link it in regardless of DS4_GPU.
63+
# ds4.c now references ds4_distributed.c (distributed inference) and ds4_ssd.c
64+
# (SSD expert-cache), each split into its own translation unit upstream. Both
65+
# are GPU-agnostic objects shared by every GPU mode, so link them in regardless
66+
# of DS4_GPU.
6667
list(APPEND DS4_OBJS "${DS4_DIR}/ds4_distributed.o")
68+
list(APPEND DS4_OBJS "${DS4_DIR}/ds4_ssd.o")
6769

6870
add_executable(${TARGET}
6971
grpc-server.cpp

backend/cpp/ds4/Makefile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# ds4 backend Makefile.
22
#
3-
# Upstream pin lives below as DS4_VERSION?=477c0e82e2699b35a65fd0a1ed6fe66b41087dfe
3+
# Upstream pin lives below as DS4_VERSION?=c463029c205c2ec8d7ab6c0df4a3f52979091286
44
# (.github/bump_deps.sh) can find and update it - matches the
55
# llama-cpp / ik-llama-cpp / turboquant convention.
66

7-
DS4_VERSION?=477c0e82e2699b35a65fd0a1ed6fe66b41087dfe
7+
DS4_VERSION?=c463029c205c2ec8d7ab6c0df4a3f52979091286
88
DS4_REPO?=https://github.com/antirez/ds4
99

1010
CURRENT_MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -18,19 +18,20 @@ UNAME_S := $(shell uname -s)
1818

1919
CMAKE_ARGS ?= -DCMAKE_BUILD_TYPE=Release
2020

21-
# ds4_distributed.o is a GPU-agnostic translation unit that ds4.c/ds4_cpu.o now
22-
# reference (upstream split distributed inference into its own .c). The same
23-
# object is shared by every GPU mode, so it is appended unconditionally below.
21+
# ds4_distributed.o and ds4_ssd.o are GPU-agnostic translation units that
22+
# ds4.c/ds4_cpu.o now reference (upstream split distributed inference and the
23+
# SSD expert-cache into their own .c files). Both objects are shared by every
24+
# GPU mode, so they are appended unconditionally below.
2425
ifeq ($(BUILD_TYPE),cublas)
2526
CMAKE_ARGS += -DDS4_GPU=cuda
26-
DS4_OBJ_TARGET := ds4.o ds4_cuda.o ds4_distributed.o
27+
DS4_OBJ_TARGET := ds4.o ds4_cuda.o ds4_distributed.o ds4_ssd.o
2728
else ifeq ($(UNAME_S),Darwin)
2829
CMAKE_ARGS += -DDS4_GPU=metal
29-
DS4_OBJ_TARGET := ds4.o ds4_metal.o ds4_distributed.o
30+
DS4_OBJ_TARGET := ds4.o ds4_metal.o ds4_distributed.o ds4_ssd.o
3031
else
3132
# CPU reference path (Linux only - macOS CPU path is broken by VM bug per ds4 README).
3233
CMAKE_ARGS += -DDS4_GPU=cpu
33-
DS4_OBJ_TARGET := ds4_cpu.o ds4_distributed.o
34+
DS4_OBJ_TARGET := ds4_cpu.o ds4_distributed.o ds4_ssd.o
3435
endif
3536

3637
ifneq ($(NATIVE),true)
@@ -55,11 +56,11 @@ ds4:
5556
# the right per-platform compile flags (Objective-C/Metal on Darwin, nvcc on Linux+CUDA).
5657
ds4/ds4.o: ds4
5758
ifeq ($(BUILD_TYPE),cublas)
58-
+$(MAKE) -C ds4 ds4.o ds4_cuda.o ds4_distributed.o
59+
+$(MAKE) -C ds4 ds4.o ds4_cuda.o ds4_distributed.o ds4_ssd.o
5960
else ifeq ($(UNAME_S),Darwin)
60-
+$(MAKE) -C ds4 ds4.o ds4_metal.o ds4_distributed.o
61+
+$(MAKE) -C ds4 ds4.o ds4_metal.o ds4_distributed.o ds4_ssd.o
6162
else
62-
+$(MAKE) -C ds4 ds4_cpu.o ds4_distributed.o
63+
+$(MAKE) -C ds4 ds4_cpu.o ds4_distributed.o ds4_ssd.o
6364
endif
6465

6566
grpc-server: ds4/ds4.o

0 commit comments

Comments
 (0)