Skip to content

Commit 5b93a37

Browse files
zhangfeiv0aobolensk
authored andcommitted
riscv64: runtime improvements
Signed-off-by: Zhang fei <[email protected]>
1 parent 8db5d5a commit 5b93a37

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cmake/platform.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ elseif(UNIX OR MINGW)
285285
if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
286286
append(DEF_ARCH_OPT_FLAGS "-march=native")
287287
endif()
288+
elseif(DNNL_TARGET_ARCH STREQUAL "RV64")
289+
# G = General-purpose extensions, C = Compression extension (very common).
290+
append(DEF_ARCH_OPT_FLAGS "-march=rv64gc")
288291
elseif(DNNL_TARGET_ARCH STREQUAL "X64")
289292
platform_clang_x64_arch_ccxx_flags(DEF_ARCH_OPT_FLAGS)
290293
endif()

src/cpu/rv64/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ if(NOT DNNL_RISCV_USE_RVV_INTRINSICS)
3232
endif()
3333
endif()
3434

35-
if(NOT (DNNL_CPU_RUNTIME STREQUAL "SEQ" OR DNNL_CPU_RUNTIME STREQUAL "OMP"))
36-
message(FATAL_ERROR "Only sequential runtime is now supported for a RISC-V CPU")
37-
endif()
38-
3935
# Build sources into an object library
4036
set(OBJ_LIB ${DNNL_LIBRARY_NAME}_cpu_riscv)
4137
add_library(${OBJ_LIB} OBJECT ${SOURCES})

0 commit comments

Comments
 (0)