From 5ce5f87a26f554173dd62d0ecf0c450ad88e5ad7 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 20 Jul 2023 22:00:07 +0200 Subject: [PATCH] fix: move metal file to grpcs assets (#777) Signed-off-by: Ettore Di Giacinto --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a47440b9..1145bcfa 100644 --- a/Makefile +++ b/Makefile @@ -282,9 +282,6 @@ build: grpcs prepare ## Build the project $(info ${GREEN}I LD_FLAGS: ${YELLOW}$(LD_FLAGS)${RESET}) CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o $(BINARY_NAME) ./ -ifeq ($(BUILD_TYPE),metal) - cp go-llama/build/bin/ggml-metal.metal . -endif dist: build mkdir -p release @@ -370,6 +367,10 @@ backend-assets/grpc/falcon: backend-assets/grpc go-ggllm/libggllm.a backend-assets/grpc/llama: backend-assets/grpc go-llama/libbinding.a CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=$(shell pwd)/go-llama LIBRARY_PATH=$(shell pwd)/go-llama \ $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/llama ./cmd/grpc/llama/ +# TODO: every binary should have its own folder instead, so can have different metal implementations +ifeq ($(BUILD_TYPE),metal) + cp go-llama/build/bin/ggml-metal.metal backend-assets/grpc/ +endif backend-assets/grpc/llama-grammar: backend-assets/grpc go-llama-grammar/libbinding.a CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=$(shell pwd)/go-llama-grammar LIBRARY_PATH=$(shell pwd)/go-llama-grammar \