Merge pull request #24805 from MengqingCao:dvpp_support

Link libacl_dvpp_mpi library when building with CANN backend
This commit is contained in:
Alexander Smorkalov 2024-01-09 13:57:42 +03:00 committed by GitHub
commit e6d5de69fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,18 @@ if(CANN_INSTALL_DIR)
set(HAVE_CANN OFF)
return()
endif()
# * libacl_dvpp_mpi.so
set(libacl_dvpp_mpi "${CANN_INSTALL_DIR}/lib64")
find_library(found_libacldvppmpi NAMES acl_dvpp_mpi PATHS ${libacl_dvpp_mpi} NO_DEFAULT_PATH)
if(found_libacldvppmpi)
set(libacl_dvpp_mpi ${found_libacldvppmpi})
message(STATUS "CANN: libacl_dvpp_mpi.so is found at ${libacl_dvpp_mpi}")
else()
message(STATUS "CANN: Missing libacl_dvpp_mpi.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)
@ -105,6 +117,7 @@ if(CANN_INSTALL_DIR)
list(APPEND libs_cann ${lib_opsproto})
list(APPEND libs_cann ${lib_graph})
list(APPEND libs_cann ${lib_ge_compiler})
list(APPEND libs_cann ${libacl_dvpp_mpi})
# * lib_graph_base.so
if(NOT CANN_VERSION_BELOW_6_3_ALPHA002)