whisper : PPC64 big-endian support (#398)

* ggml : set cache line size to 128 on POWER9

* whisper : add PPC64 big endian support
This commit is contained in:
fitzsim
2023-01-23 18:48:10 +00:00
committed by GitHub
parent 2c3f50a021
commit ae16c21e9c
3 changed files with 80 additions and 4 deletions

View File

@@ -115,11 +115,15 @@ endif
ifeq ($(UNAME_M),amd64)
CFLAGS += -mavx -mavx2 -mfma -mf16c
endif
ifeq ($(UNAME_M),ppc64le)
ifneq ($(filter ppc64%,$(UNAME_M)),)
POWER9_M := $(shell grep "POWER9" /proc/cpuinfo)
ifneq (,$(findstring POWER9,$(POWER9_M)))
CFLAGS += -mpower9-vector
endif
# Require c++23's std::byteswap for big-endian support.
ifeq ($(UNAME_M),ppc64)
CXXFLAGS += -std=c++23 -DGGML_BIG_ENDIAN
endif
endif
ifndef WHISPER_NO_ACCELERATE
# Mac M1 - include Accelerate framework