mirror of
https://git.adityakumar.xyz/llama.cpp.git
synced 2024-11-09 23:29:44 +00:00
makefile: Fix CPU feature detection on Haiku (#218)
This commit is contained in:
parent
c86ba036e6
commit
f157088cb7
1 changed files with 8 additions and 8 deletions
16
Makefile
16
Makefile
|
@ -133,20 +133,20 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
||||||
CFLAGS += -mavx512pf
|
CFLAGS += -mavx512pf
|
||||||
endif
|
endif
|
||||||
else ifeq ($(UNAME_S),Haiku)
|
else ifeq ($(UNAME_S),Haiku)
|
||||||
AVX1_M := $(shell sysinfo -cpu | grep "AVX ")
|
AVX1_M := $(shell sysinfo -cpu | grep -w "AVX")
|
||||||
ifneq (,$(findstring avx,$(AVX1_M)))
|
ifneq (,$(findstring AVX,$(AVX1_M)))
|
||||||
CFLAGS += -mavx
|
CFLAGS += -mavx
|
||||||
endif
|
endif
|
||||||
AVX2_M := $(shell sysinfo -cpu | grep "AVX2 ")
|
AVX2_M := $(shell sysinfo -cpu | grep -w "AVX2")
|
||||||
ifneq (,$(findstring avx2,$(AVX2_M)))
|
ifneq (,$(findstring AVX2,$(AVX2_M)))
|
||||||
CFLAGS += -mavx2
|
CFLAGS += -mavx2
|
||||||
endif
|
endif
|
||||||
FMA_M := $(shell sysinfo -cpu | grep "FMA ")
|
FMA_M := $(shell sysinfo -cpu | grep -w "FMA")
|
||||||
ifneq (,$(findstring fma,$(FMA_M)))
|
ifneq (,$(findstring FMA,$(FMA_M)))
|
||||||
CFLAGS += -mfma
|
CFLAGS += -mfma
|
||||||
endif
|
endif
|
||||||
F16C_M := $(shell sysinfo -cpu | grep "F16C ")
|
F16C_M := $(shell sysinfo -cpu | grep -w "F16C")
|
||||||
ifneq (,$(findstring f16c,$(F16C_M)))
|
ifneq (,$(findstring F16C,$(F16C_M)))
|
||||||
CFLAGS += -mf16c
|
CFLAGS += -mf16c
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue