Skip to content

Commit

Permalink
fix: add LLAMA_CUBLAS on BUILD_TYPE=cublas
Browse files Browse the repository at this point in the history
Thanks to @Thireus for noticing it.

See: #258
  • Loading branch information
mudler committed May 19, 2023
1 parent aa7a18f commit 60c0fe8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILD_TYPE?=
CGO_LDFLAGS?=
CUDA_LIBPATH?=/usr/local/cuda/lib64/
STABLEDIFFUSION_VERSION?=c0748eca3642d58bcf9521108bcee46959c647dc

LLAMA_CUBLAS=0
GO_TAGS?=

OPTIONAL_TARGETS?=
Expand All @@ -36,9 +36,9 @@ endif

ifeq ($(BUILD_TYPE),cublas)
CGO_LDFLAGS+=-lcublas -lcudart -L$(CUDA_LIBPATH)
LLAMA_CUBLAS=1
endif


ifeq ($(GO_TAGS),stablediffusion)
OPTIONAL_TARGETS+=go-stable-diffusion/libstablediffusion.a
endif
Expand Down Expand Up @@ -147,7 +147,7 @@ go-llama:
cd go-llama && git checkout -b build $(GOLLAMA_VERSION) && git submodule update --init --recursive --depth 1

go-llama/libbinding.a: go-llama
$(MAKE) -C go-llama BUILD_TYPE=$(BUILD_TYPE) libbinding.a
LLAMA_CUBLAS=$(LLAMA_CUBLAS) $(MAKE) -C go-llama BUILD_TYPE=$(BUILD_TYPE) libbinding.a

replace:
$(GOCMD) mod edit -replace github.com/go-skynet/go-llama.cpp=$(shell pwd)/go-llama
Expand Down

0 comments on commit 60c0fe8

Please sign in to comment.