mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +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
5
Makefile
5
Makefile
@ -75,6 +75,11 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
|||||||
endif
|
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 ")
|
AVX2_M := $(shell $(CPUINFO_CMD) | grep -m 1 "avx2 ")
|
||||||
ifneq (,$(findstring avx2,$(AVX2_M)))
|
ifneq (,$(findstring avx2,$(AVX2_M)))
|
||||||
CFLAGS += -mavx2
|
CFLAGS += -mavx2
|
||||||
|
Loading…
Reference in New Issue
Block a user