Added USE_NCCL_LIB_PATH option to enable user to set NCCL_LIBRARY during build (#6310)

Description: To enable user to set NCCL_LIBRARY during build
This commit is contained in:
Tanuja Kirthi Doddapaneni 2020-10-29 03:06:31 +05:30 committed by GitHub
parent 671971e12e
commit d261ba029a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,19 +22,24 @@
# #
# NCCL_ROOT - When set, this path is inspected instead of standard library # NCCL_ROOT - When set, this path is inspected instead of standard library
# locations as the root of the NCCL installation. # locations as the root of the NCCL installation.
# The environment variable NCCL_ROOT overrides this veriable. # The environment variable NCCL_ROOT overrides this variable.
# #
# This module defines # This module defines
# Nccl_FOUND, whether nccl has been found # Nccl_FOUND, whether nccl has been found
# NCCL_INCLUDE_DIR, directory containing header # NCCL_INCLUDE_DIR, directory containing header
# NCCL_LIBRARY, directory containing nccl library # NCCL_LIBRARY, directory containing nccl library
# NCCL_LIB_NAME, nccl library name # NCCL_LIB_NAME, nccl library name
# USE_NCCL_LIB_PATH, when set, NCCL_LIBRARY path is also inspected for the
# location of the nccl library. This would disable
# switching between static and shared.
# #
# This module assumes that the user has already called find_package(CUDA) # This module assumes that the user has already called find_package(CUDA)
if (NCCL_LIBRARY) if (NCCL_LIBRARY)
# Don't cache NCCL_LIBRARY to enable switching between static and shared. if(NOT USE_NCCL_LIB_PATH)
unset(NCCL_LIBRARY CACHE) # Don't cache NCCL_LIBRARY to enable switching between static and shared.
unset(NCCL_LIBRARY CACHE)
endif(NOT USE_NCCL_LIB_PATH)
endif() endif()
if (BUILD_WITH_SHARED_NCCL) if (BUILD_WITH_SHARED_NCCL)