whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

Support AVX/AVX2/FMA/F16C on x86-32 Linux

Open luke-jr opened this issue 2 years ago • 2 comments

This works:

--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ endif
 # Architecture specific
 # TODO: probably these flags need to be tweaked on some architectures
 #       feel free to update the Makefile for your architecture and send a pull request or issue
-ifeq ($(UNAME_M),x86_64)
+ifeq ($(UNAME_M),i686)
        ifeq ($(UNAME_S),Darwin)
                CFLAGS += -mfma -mf16c
                AVX1_M := $(shell sysctl machdep.cpu.features)

autotools would probably do it better...

luke-jr avatar Dec 24 '22 03:12 luke-jr

I'm wondering if the Intel compilers in OneAPI can help squeeze even more performance. They work across Windows, Linux and Intel-based MacOS.

JohnnyOpcode avatar Dec 27 '22 05:12 JohnnyOpcode

They're presumably not open source, so I at least wouldn't trust them...

luke-jr avatar Dec 27 '22 06:12 luke-jr