add cmake rvv support (#10411)

This commit is contained in:
haopeng authored and GitHub committed 2024-11-19 21:10:31 +01:00
1 parent 9fe0fb0626
commit 42ae10bbcd
2 files changed
+6

No files matched your search

+5
View File
@@ -244,6 +244,11 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch64")
if (GGML_LSX)
list(APPEND ARCH_FLAGS -mlsx)
endif()
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "riscv64")
message(STATUS "RISC-V detected")
if (GGML_RVV)
list(APPEND ARCH_FLAGS -march=rv64gcv -mabi=lp64d)
endif()
else()
message(STATUS "Unknown architecture")
endif()