File tree Expand file tree Collapse file tree 5 files changed +2822
-60
lines changed Expand file tree Collapse file tree 5 files changed +2822
-60
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ set(LLAMA_SCHED_MAX_COPIES "4" CACHE STRING "llama: max input copies for pipeli
128
128
option (LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE} )
129
129
option (LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE} )
130
130
option (LLAMA_BUILD_SERVER "llama: build server example" ON )
131
+ option (LLAMA_LASX "llama: enable lasx" ON )
132
+ option (LLAMA_LSX "llama: enable lsx" ON )
131
133
132
134
# add perf arguments
133
135
option (LLAMA_PERF "llama: enable perf" OFF )
@@ -1066,6 +1068,17 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
1066
1068
list (APPEND ARCH_FLAGS -mcpu=native -mtune=native )
1067
1069
#TODO: Add targets for Power8/Power9 (Altivec/VSX) and Power10(MMA) and query for big endian systems (ppc64/le/be)
1068
1070
endif ()
1071
+ elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "loongarch64" )
1072
+ message (STATUS "loongarch64 detected" )
1073
+
1074
+ list (APPEND ARCH_FLAGS -march=loongarch64 )
1075
+ if (LLAMA_LASX )
1076
+ list (APPEND ARCH_FLAGS -mlasx )
1077
+ endif ()
1078
+ if (LLAMA_LSX )
1079
+ list (APPEND ARCH_FLAGS -mlsx )
1080
+ endif ()
1081
+
1069
1082
else ()
1070
1083
message (STATUS "Unknown architecture" )
1071
1084
endif ()
You can’t perform that action at this time.
0 commit comments