From dbdd50b283e20591ceb6ad9a347d5ebdf1be5143 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sun, 7 Jan 2024 00:46:17 -0500 Subject: [PATCH] add `-DCMAKE_SYSTEM_NAME=Darwin` cmake flag (#1832) --- llm/ext_server/ext_server.cpp | 1 + llm/generate/gen_darwin.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/llm/ext_server/ext_server.cpp b/llm/ext_server/ext_server.cpp index ae597bc2..d0a036b3 100644 --- a/llm/ext_server/ext_server.cpp +++ b/llm/ext_server/ext_server.cpp @@ -12,6 +12,7 @@ void llama_server_init(ext_server_params *sparams, ext_server_resp_t *err) { #if SERVER_VERBOSE != 1 log_disable(); #endif + LOG_TEE("system info: %s", llama_print_system_info()); assert(err != NULL && sparams != NULL); err->id = 0; err->msg[0] = '\0'; diff --git a/llm/generate/gen_darwin.sh b/llm/generate/gen_darwin.sh index 97983a3f..7f3889a5 100755 --- a/llm/generate/gen_darwin.sh +++ b/llm/generate/gen_darwin.sh @@ -13,7 +13,7 @@ CMAKE_DEFS="-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DLLAMA_METAL=on -DLLAMA_ACCELERA BUILD_DIR="${LLAMACPP_DIR}/build/darwin/metal" case "${GOARCH}" in "amd64") - CMAKE_DEFS="-DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" + CMAKE_DEFS="-DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" ;; "arm64") CMAKE_DEFS="-DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 ${CMAKE_DEFS}"