mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 03:14:35 +00:00
make : use new flag variables for recent changes (#3019)
This commit is contained in:
parent
de2fe892af
commit
9e2023156e
27
Makefile
27
Makefile
@ -109,12 +109,11 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
ifdef LLAMA_CODE_COVERAGE
|
ifdef LLAMA_CODE_COVERAGE
|
||||||
CXXFLAGS += -fprofile-arcs -ftest-coverage -dumpbase ''
|
MK_CXXFLAGS += -fprofile-arcs -ftest-coverage -dumpbase ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef LLAMA_DISABLE_LOGS
|
ifdef LLAMA_DISABLE_LOGS
|
||||||
CFLAGS += -DLOG_DISABLE_LOGS
|
MK_CPPFLAGS += -DLOG_DISABLE_LOGS
|
||||||
CXXFLAGS += -DLOG_DISABLE_LOGS
|
|
||||||
endif # LLAMA_DISABLE_LOGS
|
endif # LLAMA_DISABLE_LOGS
|
||||||
|
|
||||||
# warnings
|
# warnings
|
||||||
@ -124,7 +123,7 @@ MK_CXXFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-m
|
|||||||
|
|
||||||
ifeq '' '$(findstring clang++,$(CXX))'
|
ifeq '' '$(findstring clang++,$(CXX))'
|
||||||
# g++ only
|
# g++ only
|
||||||
CXXFLAGS += -Wno-format-truncation
|
MK_CXXFLAGS += -Wno-format-truncation
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# OS specific
|
# OS specific
|
||||||
@ -188,8 +187,8 @@ endif
|
|||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
|
||||||
# https://github.com/ggerganov/llama.cpp/issues/2922
|
# https://github.com/ggerganov/llama.cpp/issues/2922
|
||||||
ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))'
|
ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))'
|
||||||
CFLAGS += -Xassembler -muse-unaligned-vector-move
|
MK_CFLAGS += -Xassembler -muse-unaligned-vector-move
|
||||||
CXXFLAGS += -Xassembler -muse-unaligned-vector-move
|
MK_CXXFLAGS += -Xassembler -muse-unaligned-vector-move
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter aarch64%,$(UNAME_M)),)
|
ifneq ($(filter aarch64%,$(UNAME_M)),)
|
||||||
@ -226,8 +225,8 @@ ifneq ($(filter ppc64%,$(UNAME_M)),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
CFLAGS += -march=rv64gcv -mabi=lp64d
|
MK_CFLAGS += -march=rv64gcv -mabi=lp64d
|
||||||
CXXFLAGS += -march=rv64gcv -mabi=lp64d
|
MK_CXXFLAGS += -march=rv64gcv -mabi=lp64d
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef LLAMA_NO_K_QUANTS
|
ifndef LLAMA_NO_K_QUANTS
|
||||||
@ -247,16 +246,6 @@ ifndef LLAMA_NO_ACCELERATE
|
|||||||
endif
|
endif
|
||||||
endif # LLAMA_NO_ACCELERATE
|
endif # LLAMA_NO_ACCELERATE
|
||||||
|
|
||||||
ifdef LLAMA_METAL
|
|
||||||
# By default - use GPU acceleration on Mac OS
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
CFLAGS += -DGGML_USE_METAL #-DGGML_METAL_NDEBUG
|
|
||||||
CXXFLAGS += -DGGML_USE_METAL
|
|
||||||
LDFLAGS += -framework Foundation -framework Metal -framework MetalKit
|
|
||||||
OBJS += ggml-metal.o
|
|
||||||
endif
|
|
||||||
endif # LLAMA_METAL
|
|
||||||
|
|
||||||
ifdef LLAMA_MPI
|
ifdef LLAMA_MPI
|
||||||
MK_CPPFLAGS += -DGGML_USE_MPI
|
MK_CPPFLAGS += -DGGML_USE_MPI
|
||||||
MK_CFLAGS += -Wno-cast-qual
|
MK_CFLAGS += -Wno-cast-qual
|
||||||
@ -368,7 +357,7 @@ ggml-cuda.o: ggml-cuda.cu ggml-cuda.h
|
|||||||
endif # LLAMA_HIPBLAS
|
endif # LLAMA_HIPBLAS
|
||||||
|
|
||||||
ifdef LLAMA_METAL
|
ifdef LLAMA_METAL
|
||||||
MK_CPPFLAGS += -DGGML_USE_METAL #-DGGML_METAL_NDEBUG
|
MK_CPPFLAGS += -DGGML_USE_METAL
|
||||||
MK_LDFLAGS += -framework Foundation -framework Metal -framework MetalKit
|
MK_LDFLAGS += -framework Foundation -framework Metal -framework MetalKit
|
||||||
OBJS += ggml-metal.o
|
OBJS += ggml-metal.o
|
||||||
endif # LLAMA_METAL
|
endif # LLAMA_METAL
|
||||||
|
Loading…
Reference in New Issue
Block a user