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 b486210b1a [Disco] Add -lrt to TVM runtime for NCCL (#15876)
b486210b1a is described below
commit b486210b1a4f69951268d9e442dda37edc4ce1fd
Author: Junru Shao <[email protected]>
AuthorDate: Wed Oct 4 18:47:46 2023 -0700
[Disco] Add -lrt to TVM runtime for NCCL (#15876)
This commit adds `-lrt` to TVM runtime when linked against static NCCL.
The static NCCL depends on symbol `shm_unlink` which comes from librt.
---
CMakeLists.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb622f3452..baa7a8dc1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -895,8 +895,9 @@ if(USE_CUDA AND USE_NVTX)
endif()
if(USE_CUDA AND USE_NCCL)
- target_link_libraries(tvm PRIVATE nccl)
- target_link_libraries(tvm_runtime PRIVATE nccl)
+ find_library(LIBRT rt)
+ target_link_libraries(tvm PRIVATE nccl ${LIBRT})
+ target_link_libraries(tvm_runtime PRIVATE nccl ${LIBRT})
endif()
if(USE_ROCM AND USE_RCCL)