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
|
# 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
|
# 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))
|
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
||||||
# Use all CPU extensions that are available:
|
ifdef LLAMA_AVX2_ONLY
|
||||||
CFLAGS += -march=native -mtune=native
|
CFLAGS += -mfma -mf16c -mavx2
|
||||||
CXXFLAGS += -march=native -mtune=native
|
CXXFLAGS += -mfma -mf16c -mavx2
|
||||||
|
else
|
||||||
# Usage AVX-only
|
# Use all CPU extensions that are available:
|
||||||
#CFLAGS += -mfma -mf16c -mavx
|
CFLAGS += -march=native -mtune=native
|
||||||
#CXXFLAGS += -mfma -mf16c -mavx
|
CXXFLAGS += -march=native -mtune=native
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq ($(filter ppc64%,$(UNAME_M)),)
|
ifneq ($(filter ppc64%,$(UNAME_M)),)
|
||||||
POWER9_M := $(shell grep "POWER9" /proc/cpuinfo)
|
POWER9_M := $(shell grep "POWER9" /proc/cpuinfo)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue