Link lib_acl_op_compiler when compile with CANN

This commit is contained in:
huafengchun 2023-11-03 16:38:37 +08:00
parent 687fc11626
commit fb352e3098

View File

@ -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})