This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/unity by this push:
     new 9f0ac49a04 [CMake] Prefer a static NCCL (#15869)
9f0ac49a04 is described below

commit 9f0ac49a0456554b4a28b871d9c7b7930322052f
Author: Junru Shao <[email protected]>
AuthorDate: Tue Oct 3 22:16:00 2023 -0700

    [CMake] Prefer a static NCCL (#15869)
    
    This PR uses static NCCL instead of the dynamic linked one to ensure
    out-of-box use of TVM Unity wheel.
---
 cmake/utils/FindNCCL.cmake | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmake/utils/FindNCCL.cmake b/cmake/utils/FindNCCL.cmake
index 0cabaf74f8..a2b23268ea 100644
--- a/cmake/utils/FindNCCL.cmake
+++ b/cmake/utils/FindNCCL.cmake
@@ -32,12 +32,13 @@ macro(find_nccl use_nccl)
   if(${use_nccl} MATCHES ${IS_FALSE_PATTERN})
     return()
   endif()
+  set(NCCL_LIB_NAME nccl_static)
   if(${use_nccl} MATCHES ${IS_TRUE_PATTERN})
     find_path(NCCL_INCLUDE_DIR NAMES nccl.h)
-    find_library(NCCL_LIBRARY NAMES nccl)
+    find_library(NCCL_LIBRARY NAMES nccl_static)
   else()
     find_path(NCCL_INCLUDE_DIR NAMES nccl.h HINTS ${use_nccl} 
${use_nccl}/include)
-    find_library(NCCL_LIBRARY NAMES nccl HINTS ${use_nccl} ${use_nccl}/lib)
+    find_library(NCCL_LIBRARY NAMES nccl_static HINTS ${use_nccl} 
${use_nccl}/lib)
   endif()
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(Nccl DEFAULT_MSG NCCL_INCLUDE_DIR 
NCCL_LIBRARY)

Reply via email to