Skip to content

Commit 3405a58

Browse files
committed
updated cmake file
1 parent 1536f89 commit 3405a58

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ggml/src/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ endif()
103103
# TODO: probably these flags need to be tweaked on some architectures
104104
# feel free to update the Makefile for your architecture and send a pull request or issue
105105
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
106+
# Enable SVE for ARMv8-A+ architectures
107+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64")
108+
message(STATUS "Enabling ARM SVE support")
109+
add_compile_options(-march=native -fopenmp -O3 -ftree-vectorize)
110+
add_compile_definitions(
111+
__ARM_FEATURE_SVE=1
112+
__ARM_FEATURE_FP16_VECTOR_ARITHMETIC=1
113+
)
114+
endif()
106115
if (MSVC)
107116
string(TOLOWER "${CMAKE_GENERATOR_PLATFORM}" CMAKE_GENERATOR_PLATFORM_LWR)
108117
message(STATUS "CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM}")

0 commit comments

Comments
 (0)