File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff 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
105105message (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 ()
106115if (MSVC )
107116 string (TOLOWER "${CMAKE_GENERATOR_PLATFORM} " CMAKE_GENERATOR_PLATFORM_LWR)
108117 message (STATUS "CMAKE_GENERATOR_PLATFORM: ${CMAKE_GENERATOR_PLATFORM} " )
You can’t perform that action at this time.
0 commit comments