mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-18 20:27:53 +00:00
make : fix Linux machines supporting AVX1 not AVX2 (#1162)
e.g. ancient CPU E5-2670 (v1) See issue #1126 Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
parent
c84cf87261
commit
8ce20f0f3d
7
Makefile
7
Makefile
@ -74,7 +74,12 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
||||
CPUINFO_CMD := sysinfo -cpu
|
||||
endif
|
||||
|
||||
ifdef CPUINFO_CMD
|
||||
ifdef CPUINFO_CMD
|
||||
AVX_M := $(shell $(CPUINFO_CMD) | grep -m 1 "avx ")
|
||||
ifneq (,$(findstring avx,$(AVX_M)))
|
||||
CFLAGS += -mavx
|
||||
endif
|
||||
|
||||
AVX2_M := $(shell $(CPUINFO_CMD) | grep -m 1 "avx2 ")
|
||||
ifneq (,$(findstring avx2,$(AVX2_M)))
|
||||
CFLAGS += -mavx2
|
||||
|
Loading…
Reference in New Issue
Block a user