Skip to content

Commit dbd3a6d

Browse files
committed
Fix issue installing on m1 macs
1 parent 482ecd7 commit dbd3a6d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ option(LLAMA_BUILD "Build llama.cpp shared library and install alongside python
77

88
if (LLAMA_BUILD)
99
set(BUILD_SHARED_LIBS "On")
10-
if (APPLE)
11-
# Need to disable these llama.cpp flags on Apple
10+
if (APPLE AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
11+
# Need to disable these llama.cpp flags on Apple x86_64,
1212
# otherwise users may encounter invalid instruction errors
1313
set(LLAMA_AVX "Off" CACHE BOOL "llama: enable AVX" FORCE)
1414
set(LLAMA_AVX2 "Off" CACHE BOOL "llama: enable AVX2" FORCE)
1515
set(LLAMA_FMA "Off" CACHE BOOL "llama: enable FMA" FORCE)
1616
set(LLAMA_F16C "Off" CACHE BOOL "llama: enable F16C" FORCE)
17-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mtune=native")
18-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
1917
endif()
2018
add_subdirectory(vendor/llama.cpp)
2119
install(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy