]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Fix cuda compilation (#1128)
authorslaren <redacted>
Mon, 24 Apr 2023 15:29:58 +0000 (17:29 +0200)
committerGitHub <redacted>
Mon, 24 Apr 2023 15:29:58 +0000 (17:29 +0200)
* Fix: Issue with CUBLAS compilation error due to missing -fPIC flag

---------

Co-authored-by: B1gM8c <redacted>
Makefile

index 0c7b6548dda1e0924e0070c02157e0fec656406a..8fbb19c46cc102dc8b858d86eadd68eaa0b32fb8 100644 (file)
--- 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