From 27175419381f8bbb9946b98736c83903dfe37028 Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 10 Jun 2023 23:19:28 +0200 Subject: [PATCH] fix: copy metal file from build This ties the metal file to the build and reduces the steps the user has to take to run local-ai --- .gitignore | 4 +++- Makefile | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d1a7f148..8ad9f228 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,6 @@ release/ .idea # Generated during build -backend-assets/ \ No newline at end of file +backend-assets/ + +/ggml-metal.metal \ No newline at end of file diff --git a/Makefile b/Makefile index c927546d..ca1b9620 100644 --- a/Makefile +++ b/Makefile @@ -219,6 +219,9 @@ build: prepare ## Build the project $(info ${GREEN}I BUILD_TYPE: ${YELLOW}$(BUILD_TYPE)${RESET}) $(info ${GREEN}I GO_TAGS: ${YELLOW}$(GO_TAGS)${RESET}) CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=${C_INCLUDE_PATH} LIBRARY_PATH=${LIBRARY_PATH} $(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