fix kernel_executor arm64 compile.

This commit is contained in:
wangpingan2 2023-02-24 15:31:08 +08:00
parent bb4e21579f
commit 8e77db1261
3 changed files with 8 additions and 15 deletions

View File

@ -1058,10 +1058,8 @@ if(MSLITE_ENABLE_KERNEL_EXECUTOR)
${RUNTIME_INC_DIR}/api COMPONENT ${RUNTIME_COMPONENT_NAME})
install(TARGETS kernel_executor DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME})
install(TARGETS mindspore_core DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME})
if(MSLITE_ENABLE_CONVERTER)
install(FILES ${glog_LIBPATH}/libmindspore_glog.so.0.4.0 DESTINATION ${RUNTIME_LIB_DIR}
RENAME libmindspore_glog.so.0 COMPONENT ${RUNTIME_COMPONENT_NAME})
endif()
install(FILES ${glog_LIBPATH}/libmindspore_glog.so.0.4.0 DESTINATION ${RUNTIME_LIB_DIR}
RENAME libmindspore_glog.so.0 COMPONENT ${RUNTIME_COMPONENT_NAME})
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")

View File

@ -451,6 +451,10 @@ if(MSLITE_ENABLE_CONVERTER)
add_compile_definitions(ENABLE_CONVERTER)
endif()
if(MSLITE_ENABLE_KERNEL_EXECUTOR)
set(MSLITE_ENABLE_RUNTIME_GLOG on)
endif()
if(MSLITE_ENABLE_FP16 AND PLATFORM_ARM32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0)
message(STATUS "If you want to build fp16 in arm82_a32, please use android nkd r21e or r22b!")

View File

@ -1,11 +1,5 @@
add_compile_definitions(BUILD_CORE_RUNTIME)
add_definitions(-DPRIMITIVE_WRITEABLE)
string(REPLACE "-fno-rtti" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
string(REPLACE "-fno-rtti" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "-fno-exceptions" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
string(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
add_library(kernel_executor SHARED
${CMAKE_CURRENT_SOURCE_DIR}/kernel_executor.cc
${CMAKE_CURRENT_SOURCE_DIR}/kernel_executor_impl.cc
@ -20,8 +14,5 @@ target_link_libraries(kernel_executor
mindspore-lite
mindspore_core
mindspore::json
mindspore::flatbuffers)
if(USE_GLOG)
target_link_libraries(kernel_executor mindspore::glog)
endif()
mindspore::flatbuffers
mindspore::glog)