Spaces:
Running
Running
Syed Jafri
commited on
Allow building with Accelerate for x86_64 Macs (#123)
Browse files* Cross compile windows
* set env properly
* rm log
* fix review
* Add back space
* Don't force architecture
* Allow building x86_64 with accelerate
Makefile
CHANGED
|
@@ -16,8 +16,8 @@ ifeq ($(UNAME_S),Darwin)
|
|
| 16 |
ifneq ($(UNAME_P),arm)
|
| 17 |
SYSCTL_M := $(shell sysctl -n hw.optional.arm64)
|
| 18 |
ifeq ($(SYSCTL_M),1)
|
| 19 |
-
UNAME_P := arm
|
| 20 |
-
UNAME_M := arm64
|
| 21 |
warn := $(warning Your arch is announced as x86_64, but it seems to actually be ARM64. Not fixing that can lead to bad performance. For more info see: https://github.com/ggerganov/whisper.cpp/issues/66\#issuecomment-1282546789)
|
| 22 |
endif
|
| 23 |
endif
|
|
@@ -55,7 +55,7 @@ endif
|
|
| 55 |
ifeq ($(UNAME_M),amd64)
|
| 56 |
CFLAGS += -mavx -mavx2 -mfma -mf16c
|
| 57 |
endif
|
| 58 |
-
|
| 59 |
# Mac M1 - include Accelerate framework
|
| 60 |
ifeq ($(UNAME_S),Darwin)
|
| 61 |
CFLAGS += -DGGML_USE_ACCELERATE
|
|
|
|
| 16 |
ifneq ($(UNAME_P),arm)
|
| 17 |
SYSCTL_M := $(shell sysctl -n hw.optional.arm64)
|
| 18 |
ifeq ($(SYSCTL_M),1)
|
| 19 |
+
# UNAME_P := arm
|
| 20 |
+
# UNAME_M := arm64
|
| 21 |
warn := $(warning Your arch is announced as x86_64, but it seems to actually be ARM64. Not fixing that can lead to bad performance. For more info see: https://github.com/ggerganov/whisper.cpp/issues/66\#issuecomment-1282546789)
|
| 22 |
endif
|
| 23 |
endif
|
|
|
|
| 55 |
ifeq ($(UNAME_M),amd64)
|
| 56 |
CFLAGS += -mavx -mavx2 -mfma -mf16c
|
| 57 |
endif
|
| 58 |
+
ifndef WHISPER_NO_ACCELERATE
|
| 59 |
# Mac M1 - include Accelerate framework
|
| 60 |
ifeq ($(UNAME_S),Darwin)
|
| 61 |
CFLAGS += -DGGML_USE_ACCELERATE
|