!49357 fix op arm64 compile

Merge pull request !49357 from wangpingan/op_compile
This commit is contained in:
i-robot 2023-02-25 06:45:53 +00:00 committed by Gitee
commit abd4dd0dc2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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)