From a7db97e0336de74d2644122f468bd296449814d1 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 18 Nov 2024 13:59:06 +0100 Subject: [PATCH] chore(Makefile): default to non-native builds for llama.cpp (#4173) Signed-off-by: Ettore Di Giacinto --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24621291..e7a6cc53 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ DETECT_LIBS?=true # llama.cpp versions GOLLAMA_REPO?=https://github.com/go-skynet/go-llama.cpp GOLLAMA_VERSION?=2b57a8ae43e4699d3dc5d1496a1ccd42922993be -CPPLLAMA_VERSION?=db4cfd5dbc31c90f0d5c413a2e182d068b8ee308 +CPPLLAMA_VERSION?=ce2e59ba107cf71ed566040ff20a15d1c58e09c2 # go-rwkv version RWKV_REPO?=https://github.com/donomii/go-rwkv.cpp @@ -45,6 +45,7 @@ CGO_LDFLAGS_WHISPER+=-lggml CUDA_LIBPATH?=/usr/local/cuda/lib64/ GO_TAGS?= BUILD_ID?= +NATIVE?=false TEST_DIR=/tmp/test @@ -83,6 +84,11 @@ ifndef UNAME_S UNAME_S := $(shell uname -s) endif +# IF native is false, we add -DGGML_NATIVE=OFF to CMAKE_ARGS +ifeq ($(NATIVE),false) + CMAKE_ARGS+=-DGGML_NATIVE=OFF +endif + ifeq ($(OS),Darwin) ifeq ($(OSX_SIGNING_IDENTITY),)