added cublas back into the makefile as some people requested
This commit is contained in:
parent
15de626b3a
commit
e4265198ed
1 changed files with 28 additions and 8 deletions
22
Makefile
22
Makefile
|
@ -131,7 +131,27 @@ ifndef LLAMA_NO_ACCELERATE
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# to ease maintenance burden, please use the CMake file to generate CUDA builds instead.
|
# it is recommended to use the CMAKE file to build for cublas if you can - will likely work better
|
||||||
|
ifdef LLAMA_CUBLAS
|
||||||
|
CFLAGS += -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I$(CUDA_PATH)/targets/x86_64-linux/include
|
||||||
|
CXXFLAGS += -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I$(CUDA_PATH)/targets/x86_64-linux/include
|
||||||
|
LDFLAGS += -lcublas -lculibos -lcudart -lcublasLt -lpthread -ldl -lrt -L/usr/local/cuda/lib64 -L/opt/cuda/lib64 -L$(CUDA_PATH)/targets/x86_64-linux/lib
|
||||||
|
OBJS += ggml-cuda.o
|
||||||
|
NVCC = nvcc
|
||||||
|
NVCCFLAGS = --forward-unknown-to-host-compiler -arch=native
|
||||||
|
ifdef LLAMA_CUDA_DMMV_X
|
||||||
|
NVCCFLAGS += -DGGML_CUDA_DMMV_X=$(LLAMA_CUDA_DMMV_X)
|
||||||
|
else
|
||||||
|
NVCCFLAGS += -DGGML_CUDA_DMMV_X=32
|
||||||
|
endif # LLAMA_CUDA_DMMV_X
|
||||||
|
ifdef LLAMA_CUDA_DMMV_Y
|
||||||
|
NVCCFLAGS += -DGGML_CUDA_DMMV_Y=$(LLAMA_CUDA_DMMV_Y)
|
||||||
|
else
|
||||||
|
NVCCFLAGS += -DGGML_CUDA_DMMV_Y=1
|
||||||
|
endif # LLAMA_CUDA_DMMV_Y
|
||||||
|
ggml-cuda.o: ggml-cuda.cu ggml-cuda.h
|
||||||
|
$(NVCC) $(NVCCFLAGS) $(CXXFLAGS) -Wno-pedantic -c $< -o $@
|
||||||
|
endif # LLAMA_CUBLAS
|
||||||
|
|
||||||
ifdef LLAMA_METAL
|
ifdef LLAMA_METAL
|
||||||
CFLAGS += -DGGML_USE_METAL -DGGML_METAL_NDEBUG
|
CFLAGS += -DGGML_USE_METAL -DGGML_METAL_NDEBUG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue