File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,13 @@ option(LLAMA_BUILD "Build llama.cpp shared library and install alongside python
7
7
8
8
if (LLAMA_BUILD)
9
9
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,
12
12
# otherwise users may encounter invalid instruction errors
13
13
set (LLAMA_AVX "Off" CACHE BOOL "llama: enable AVX" FORCE)
14
14
set (LLAMA_AVX2 "Off" CACHE BOOL "llama: enable AVX2" FORCE)
15
15
set (LLAMA_FMA "Off" CACHE BOOL "llama: enable FMA" FORCE)
16
16
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" )
19
17
endif ()
20
18
add_subdirectory (vendor/llama.cpp)
21
19
install (
You can’t perform that action at this time.
0 commit comments