]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
make : 32-bit ARM flags (#486)
authorclach04 <redacted>
Wed, 29 Mar 2023 20:11:35 +0000 (13:11 -0700)
committerGitHub <redacted>
Wed, 29 Mar 2023 20:11:35 +0000 (23:11 +0300)
* issue #470 - working 32-bit ARM

* Update Makefile

* Update Makefile

---------

Co-authored-by: Georgi Gerganov <redacted>
Makefile

index 12c40fb086b31a6af2a48f413b4a652c0f87b7d9..ecf07cacfc37880655c7e80b79e291d69dd17273 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -151,12 +151,15 @@ ifneq ($(filter aarch64%,$(UNAME_M)),)
        CXXFLAGS += -mcpu=native
 endif
 ifneq ($(filter armv6%,$(UNAME_M)),)
-       # Raspberry Pi 1, 2, 3
-       CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access
+       # 32-bit Raspberry Pi 1, 2, 3
+       CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access
 endif
 ifneq ($(filter armv7%,$(UNAME_M)),)
-       # Raspberry Pi 4
-       CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
+       # 32-bit ARM, for example on Armbian or possibly raspbian
+       CFLAGS += -mfpu=neon -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
+       
+       # 64-bit ARM, use these (TODO: auto-detect 64-bit)
+       # CFLAGS += -mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations
 endif
 ifneq ($(filter armv8%,$(UNAME_M)),)
        # Raspberry Pi 4