File tree Expand file tree Collapse file tree 5 files changed +2792
-47
lines changed Expand file tree Collapse file tree 5 files changed +2792
-47
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ set(LLAMA_SCHED_MAX_COPIES "4" CACHE STRING "llama: max input copies for pipeli
134
134
option (LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE} )
135
135
option (LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE} )
136
136
option (LLAMA_BUILD_SERVER "llama: build server example" ON )
137
+ option (LLAMA_LASX "llama: enable lasx" ON )
138
+ option (LLAMA_LSX "llama: enable lsx" ON )
137
139
138
140
# add perf arguments
139
141
option (LLAMA_PERF "llama: enable perf" OFF )
@@ -1130,6 +1132,17 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
1130
1132
list (APPEND ARCH_FLAGS -mcpu=native -mtune=native )
1131
1133
#TODO: Add targets for Power8/Power9 (Altivec/VSX) and Power10(MMA) and query for big endian systems (ppc64/le/be)
1132
1134
endif ()
1135
+ elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "loongarch64" )
1136
+ message (STATUS "loongarch64 detected" )
1137
+
1138
+ list (APPEND ARCH_FLAGS -march=loongarch64 )
1139
+ if (LLAMA_LASX )
1140
+ list (APPEND ARCH_FLAGS -mlasx )
1141
+ endif ()
1142
+ if (LLAMA_LSX )
1143
+ list (APPEND ARCH_FLAGS -mlsx )
1144
+ endif ()
1145
+
1133
1146
else ()
1134
1147
message (STATUS "Unknown architecture" )
1135
1148
endif ()
You can’t perform that action at this time.
0 commit comments