File tree Expand file tree Collapse file tree 4 files changed +789
-405
lines changed Expand file tree Collapse file tree 4 files changed +789
-405
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ endif()
123123option (GGML_LASX "ggml: enable lasx" ON )
124124option (GGML_LSX "ggml: enable lsx" ON )
125125option (GGML_RVV "ggml: enable rvv" ON )
126+ option (GGML_RV_ZFH "ggml: enable riscv zfh" OFF )
126127option (GGML_VXE "ggml: enable vxe" ON )
127128
128129option (GGML_CPU_ALL_VARIANTS "ggml: build all variants of the CPU backend (requires GGML_BACKEND_DL)" OFF )
Original file line number Diff line number Diff line change @@ -320,7 +320,11 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
320320 elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "riscv64" )
321321 message (STATUS "RISC-V detected" )
322322 if (GGML_RVV)
323- list (APPEND ARCH_FLAGS -march=rv64gcv -mabi=lp64d)
323+ if (GGML_RV_ZFH)
324+ list (APPEND ARCH_FLAGS -march=rv64gcv_zfhmin -DGGML_RV_ZFH -mabi=lp64d)
325+ else ()
326+ list (APPEND ARCH_FLAGS -march=rv64gcv -mabi=lp64d)
327+ endif ()
324328 endif ()
325329 elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x" )
326330 message (STATUS "s390x detected" )
You can’t perform that action at this time.
0 commit comments