Merge pull request #24488 from hipudding:npu_support

Link lib_acl_op_compiler when compile with CANN
pull/24519/head
Alexander Smorkalov 1 year ago committed by GitHub
commit b3791dc4be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      cmake/OpenCVFindCANN.cmake

@ -46,6 +46,17 @@ if(CANN_INSTALL_DIR)
set(HAVE_CANN OFF)
return()
endif()
# * libacl_op_compiler.so
set(lib_acl_op_compiler "${CANN_INSTALL_DIR}/lib64")
find_library(found_lib_acl_op_compiler NAMES acl_op_compiler PATHS ${lib_acl_op_compiler} NO_DEFAULT_PATH)
if(found_lib_acl_op_compiler)
set(lib_acl_op_compiler ${found_lib_acl_op_compiler})
message(STATUS "CANN: libacl_op_compiler.so is found at ${lib_acl_op_compiler}")
else()
message(STATUS "CANN: Missing libacl_op_compiler.so. Turning off HAVE_CANN")
set(HAVE_CANN OFF)
return()
endif()
# * libgraph.so
set(lib_graph "${CANN_INSTALL_DIR}/compiler/lib64")
find_library(found_lib_graph NAMES graph PATHS ${lib_graph} NO_DEFAULT_PATH)
@ -90,6 +101,7 @@ if(CANN_INSTALL_DIR)
set(libs_cann "")
list(APPEND libs_cann ${lib_ascendcl})
list(APPEND libs_cann ${lib_acl_op_compiler})
list(APPEND libs_cann ${lib_opsproto})
list(APPEND libs_cann ${lib_graph})
list(APPEND libs_cann ${lib_ge_compiler})

Loading…
Cancel
Save