mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 02:44:36 +00:00
build : add ACCELERATE_NEW_LAPACK to fix warning on macOS Sonoma (#3342)
This commit is contained in:
parent
ffe88a36a9
commit
527e57cfd8
@ -162,6 +162,8 @@ if (APPLE AND LLAMA_ACCELERATE)
|
|||||||
message(STATUS "Accelerate framework found")
|
message(STATUS "Accelerate framework found")
|
||||||
|
|
||||||
add_compile_definitions(GGML_USE_ACCELERATE)
|
add_compile_definitions(GGML_USE_ACCELERATE)
|
||||||
|
add_compile_definitions(ACCELERATE_NEW_LAPACK)
|
||||||
|
add_compile_definitions(ACCELERATE_LAPACK_ILP64)
|
||||||
set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} ${ACCELERATE_FRAMEWORK})
|
set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} ${ACCELERATE_FRAMEWORK})
|
||||||
else()
|
else()
|
||||||
message(WARNING "Accelerate framework not found")
|
message(WARNING "Accelerate framework not found")
|
||||||
|
2
Makefile
2
Makefile
@ -305,6 +305,8 @@ ifndef LLAMA_NO_ACCELERATE
|
|||||||
# `-framework Accelerate` works both with Apple Silicon and Mac Intel
|
# `-framework Accelerate` works both with Apple Silicon and Mac Intel
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
MK_CPPFLAGS += -DGGML_USE_ACCELERATE
|
MK_CPPFLAGS += -DGGML_USE_ACCELERATE
|
||||||
|
MK_CPPFLAGS += -DACCELERATE_NEW_LAPACK
|
||||||
|
MK_CPPFLAGS += -DACCELERATE_LAPACK_ILP64
|
||||||
MK_LDFLAGS += -framework Accelerate
|
MK_LDFLAGS += -framework Accelerate
|
||||||
endif
|
endif
|
||||||
endif # LLAMA_NO_ACCELERATE
|
endif # LLAMA_NO_ACCELERATE
|
||||||
|
@ -45,6 +45,8 @@ let package = Package(
|
|||||||
.unsafeFlags(["-Wno-shorten-64-to-32"]),
|
.unsafeFlags(["-Wno-shorten-64-to-32"]),
|
||||||
.define("GGML_USE_K_QUANTS"),
|
.define("GGML_USE_K_QUANTS"),
|
||||||
.define("GGML_USE_ACCELERATE")
|
.define("GGML_USE_ACCELERATE")
|
||||||
|
.define("ACCELERATE_NEW_LAPACK")
|
||||||
|
.define("ACCELERATE_LAPACK_ILP64")
|
||||||
] + additionalSettings,
|
] + additionalSettings,
|
||||||
linkerSettings: [
|
linkerSettings: [
|
||||||
.linkedFramework("Accelerate")
|
.linkedFramework("Accelerate")
|
||||||
|
Loading…
Reference in New Issue
Block a user