mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-02 20:18:42 +02:00
make : disable avx in case f16c is not available (#706)
Why: * ggml.c does not support AVX without F16C
This commit is contained in:
parent
ccb47e7e10
commit
5f16420333
18
Makefile
18
Makefile
@ -77,10 +77,6 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
|||||||
CFLAGS += -mavx2
|
CFLAGS += -mavx2
|
||||||
endif
|
endif
|
||||||
else ifeq ($(UNAME_S),Linux)
|
else ifeq ($(UNAME_S),Linux)
|
||||||
AVX1_M := $(shell grep "avx " /proc/cpuinfo)
|
|
||||||
ifneq (,$(findstring avx,$(AVX1_M)))
|
|
||||||
CFLAGS += -mavx
|
|
||||||
endif
|
|
||||||
AVX2_M := $(shell grep "avx2 " /proc/cpuinfo)
|
AVX2_M := $(shell grep "avx2 " /proc/cpuinfo)
|
||||||
ifneq (,$(findstring avx2,$(AVX2_M)))
|
ifneq (,$(findstring avx2,$(AVX2_M)))
|
||||||
CFLAGS += -mavx2
|
CFLAGS += -mavx2
|
||||||
@ -92,16 +88,17 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
|||||||
F16C_M := $(shell grep "f16c " /proc/cpuinfo)
|
F16C_M := $(shell grep "f16c " /proc/cpuinfo)
|
||||||
ifneq (,$(findstring f16c,$(F16C_M)))
|
ifneq (,$(findstring f16c,$(F16C_M)))
|
||||||
CFLAGS += -mf16c
|
CFLAGS += -mf16c
|
||||||
|
|
||||||
|
AVX1_M := $(shell grep "avx " /proc/cpuinfo)
|
||||||
|
ifneq (,$(findstring avx,$(AVX1_M)))
|
||||||
|
CFLAGS += -mavx
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
SSE3_M := $(shell grep "sse3 " /proc/cpuinfo)
|
SSE3_M := $(shell grep "sse3 " /proc/cpuinfo)
|
||||||
ifneq (,$(findstring sse3,$(SSE3_M)))
|
ifneq (,$(findstring sse3,$(SSE3_M)))
|
||||||
CFLAGS += -msse3
|
CFLAGS += -msse3
|
||||||
endif
|
endif
|
||||||
else ifeq ($(UNAME_S),Haiku)
|
else ifeq ($(UNAME_S),Haiku)
|
||||||
AVX1_M := $(shell sysinfo -cpu | grep "AVX ")
|
|
||||||
ifneq (,$(findstring avx,$(AVX1_M)))
|
|
||||||
CFLAGS += -mavx
|
|
||||||
endif
|
|
||||||
AVX2_M := $(shell sysinfo -cpu | grep "AVX2 ")
|
AVX2_M := $(shell sysinfo -cpu | grep "AVX2 ")
|
||||||
ifneq (,$(findstring avx2,$(AVX2_M)))
|
ifneq (,$(findstring avx2,$(AVX2_M)))
|
||||||
CFLAGS += -mavx2
|
CFLAGS += -mavx2
|
||||||
@ -113,6 +110,11 @@ ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686))
|
|||||||
F16C_M := $(shell sysinfo -cpu | grep "F16C ")
|
F16C_M := $(shell sysinfo -cpu | grep "F16C ")
|
||||||
ifneq (,$(findstring f16c,$(F16C_M)))
|
ifneq (,$(findstring f16c,$(F16C_M)))
|
||||||
CFLAGS += -mf16c
|
CFLAGS += -mf16c
|
||||||
|
|
||||||
|
AVX1_M := $(shell sysinfo -cpu | grep "AVX ")
|
||||||
|
ifneq (,$(findstring avx,$(AVX1_M)))
|
||||||
|
CFLAGS += -mavx
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
CFLAGS += -mfma -mf16c -mavx -mavx2
|
CFLAGS += -mfma -mf16c -mavx -mavx2
|
||||||
|
Loading…
Reference in New Issue
Block a user