mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-12 19:50:17 +00:00
add cmake rvv support (#10411)
This commit is contained in:
parent
9fe0fb0626
commit
42ae10bbcd
@ -109,6 +109,7 @@ if (NOT MSVC)
|
|||||||
endif()
|
endif()
|
||||||
option(GGML_LASX "ggml: enable lasx" ON)
|
option(GGML_LASX "ggml: enable lasx" ON)
|
||||||
option(GGML_LSX "ggml: enable lsx" ON)
|
option(GGML_LSX "ggml: enable lsx" ON)
|
||||||
|
option(GGML_RVV "ggml: enable rvv" ON)
|
||||||
option(GGML_SVE "ggml: enable SVE" OFF)
|
option(GGML_SVE "ggml: enable SVE" OFF)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -244,6 +244,11 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch64")
|
|||||||
if (GGML_LSX)
|
if (GGML_LSX)
|
||||||
list(APPEND ARCH_FLAGS -mlsx)
|
list(APPEND ARCH_FLAGS -mlsx)
|
||||||
endif()
|
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()
|
else()
|
||||||
message(STATUS "Unknown architecture")
|
message(STATUS "Unknown architecture")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user