]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
make : fix PERF build with cuBLAS
authorGeorgi Gerganov <redacted>
Sat, 13 May 2023 14:25:09 +0000 (17:25 +0300)
committerGeorgi Gerganov <redacted>
Sat, 13 May 2023 14:25:09 +0000 (17:25 +0300)
Makefile

index 0ddff9961ac76f567c7637f399dbb18703bdb54e..fff4c11d1819580aa8c86ecdb2b12b502f679d2d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -74,6 +74,15 @@ ifeq ($(UNAME_S),Haiku)
        CXXFLAGS += -pthread
 endif
 
+ifdef LLAMA_GPROF
+       CFLAGS   += -pg
+       CXXFLAGS += -pg
+endif
+ifdef LLAMA_PERF
+       CFLAGS   += -DGGML_PERF
+       CXXFLAGS += -DGGML_PERF
+endif
+
 # Architecture specific
 # TODO: probably these flags need to be tweaked on some architectures
 #       feel free to update the Makefile for your architecture and send a pull request or issue
@@ -135,14 +144,6 @@ ifdef LLAMA_CLBLAST
 ggml-opencl.o: ggml-opencl.c ggml-opencl.h
        $(CC) $(CFLAGS) -c $< -o $@
 endif
-ifdef LLAMA_GPROF
-       CFLAGS   += -pg
-       CXXFLAGS += -pg
-endif
-ifdef LLAMA_PERF
-       CFLAGS   += -DGGML_PERF
-       CXXFLAGS += -DGGML_PERF
-endif
 ifneq ($(filter aarch64%,$(UNAME_M)),)
        # Apple M1, M2, etc.
        # Raspberry Pi 3, 4, Zero 2 (64-bit)