From: slaren Date: Mon, 24 Apr 2023 15:29:58 +0000 (+0200) Subject: Fix cuda compilation (#1128) X-Git-Tag: gguf-v0.4.0~878 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=e4cf982e0d4fcfbb4b977a52dbeacd115da10c3b;p=pkg%2Fggml%2Fsources%2Fllama.cpp Fix cuda compilation (#1128) * Fix: Issue with CUBLAS compilation error due to missing -fPIC flag --------- Co-authored-by: B1gM8c --- diff --git a/Makefile b/Makefile index 0c7b6548..8fbb19c4 100644 --- a/Makefile +++ b/Makefile @@ -109,9 +109,9 @@ ifdef LLAMA_CUBLAS LDFLAGS += -lcublas -lculibos -lcudart -lcublasLt -lpthread -ldl -lrt -L/usr/local/cuda/lib64 OBJS += ggml-cuda.o NVCC = nvcc - NVCCFLAGS = --forward-unknown-to-host-linker -arch=native + NVCCFLAGS = --forward-unknown-to-host-compiler -arch=native ggml-cuda.o: ggml-cuda.cu ggml-cuda.h - $(NVCC) $(NVCCFLAGS) $(CXXFLAGS) -c $< -o $@ + $(NVCC) $(NVCCFLAGS) $(CXXFLAGS) -Wno-pedantic -c $< -o $@ endif ifdef LLAMA_GPROF CFLAGS += -pg