Skip to content

Commit f5146bd

Browse files
authored
feat: add clblast support (#412)
Signed-off-by: mudler <[email protected]>
1 parent b57ea10 commit f5146bd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GOTEST=$(GOCMD) test
33
GOVET=$(GOCMD) vet
44
BINARY_NAME=local-ai
55

6-
GOLLAMA_VERSION?=fbec625895ba0c458f783b62c8569135c5e80d79
6+
GOLLAMA_VERSION?=4bd3910005a593a6db237bc82c506d6d9fb81b18
77
GPT4ALL_REPO?=https://github.com/nomic-ai/gpt4all
88
GPT4ALL_VERSION?=73db20ba85fbbdc66a56e2619394c0eea40dc72b
99
GOGGMLTRANSFORMERS_VERSION?=4f18e5eb75089dc1fc8f1c955bb8f73d18520a46
@@ -41,6 +41,10 @@ ifeq ($(BUILD_TYPE),cublas)
4141
export LLAMA_CUBLAS=1
4242
endif
4343

44+
ifeq ($(BUILD_TYPE),clblas)
45+
CGO_LDFLAGS+=-lOpenCL -lclblast
46+
endif
47+
4448
# glibc-static or glibc-devel-static required
4549
ifeq ($(STATIC),true)
4650
LD_FLAGS=-linkmode external -extldflags -static
@@ -111,6 +115,8 @@ bloomz:
111115
@find ./bloomz -type f -name "*.h" -exec sed -i'' -e 's/ggml_/ggml_bloomz_/g' {} +
112116
@find ./bloomz -type f -name "*.cpp" -exec sed -i'' -e 's/gpt_/gpt_bloomz_/g' {} +
113117
@find ./bloomz -type f -name "*.h" -exec sed -i'' -e 's/gpt_/gpt_bloomz_/g' {} +
118+
@find ./bloomz -type f -name "*.cpp" -exec sed -i'' -e 's/void replace/void json_bloomz_replace/g' {} +
119+
@find ./bloomz -type f -name "*.cpp" -exec sed -i'' -e 's/::replace/::json_bloomz_replace/g' {} +
114120

115121
bloomz/libbloomz.a: bloomz
116122
cd bloomz && make libbloomz.a

0 commit comments

Comments
 (0)