Skip to content

Commit 4b445af

Browse files
committed
build: add fallback variant
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 019ad4b commit 4b445af

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,17 @@ backend-assets/grpc/llama-cpp-noavx: backend-assets/grpc
664664
$(MAKE) VARIANT="llama-noavx" build-llama-cpp-grpc-server
665665
cp -rfv backend/cpp/llama-noavx/grpc-server backend-assets/grpc/llama-cpp-noavx
666666

667+
backend-assets/grpc/llama-cpp-fallback: backend-assets/grpc
668+
$(info ${GREEN}I llama-cpp build info:fallback${RESET})
669+
cp -rf backend/cpp/llama backend/cpp/llama-fallback
670+
$(MAKE) -C backend/cpp/llama-fallback purge
671+
CMAKE_ARGS+=-DLLAMA_F16C=OFF
672+
CMAKE_ARGS+=-DLLAMA_AVX512=OFF
673+
CMAKE_ARGS+=-DLLAMA_AVX2=OFF
674+
CMAKE_ARGS+=-DLLAMA_FMA=OFF
675+
$(MAKE) VARIANT="llama-fallback" build-llama-cpp-grpc-server
676+
cp -rfv backend/cpp/llama-fallback/grpc-server backend-assets/grpc/llama-cpp-fallback
677+
667678
backend-assets/grpc/llama-ggml: sources/go-llama.cpp sources/go-llama.cpp/libbinding.a backend-assets/grpc
668679
CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=$(CURDIR)/sources/go-llama.cpp LIBRARY_PATH=$(CURDIR)/sources/go-llama.cpp \
669680
$(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/llama-ggml ./backend/go/llm/llama-ggml/

0 commit comments

Comments
 (0)