Makefile: support LLAMA_AVX2_ONLY.
This commit is contained in:
parent
34d9f22f44
commit
2e3b2e7e09
1 changed files with 8 additions and 7 deletions
15
Makefile
15
Makefile
|
@ -78,13 +78,14 @@ endif
|
|||
# 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
|
||||
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
||||
# Use all CPU extensions that are available:
|
||||
CFLAGS += -march=native -mtune=native
|
||||
CXXFLAGS += -march=native -mtune=native
|
||||
|
||||
# Usage AVX-only
|
||||
#CFLAGS += -mfma -mf16c -mavx
|
||||
#CXXFLAGS += -mfma -mf16c -mavx
|
||||
ifdef LLAMA_AVX2_ONLY
|
||||
CFLAGS += -mfma -mf16c -mavx2
|
||||
CXXFLAGS += -mfma -mf16c -mavx2
|
||||
else
|
||||
# Use all CPU extensions that are available:
|
||||
CFLAGS += -march=native -mtune=native
|
||||
CXXFLAGS += -march=native -mtune=native
|
||||
endif
|
||||
endif
|
||||
ifneq ($(filter ppc64%,$(UNAME_M)),)
|
||||
POWER9_M := $(shell grep "POWER9" /proc/cpuinfo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue