Skip to content

Commit b486210

Browse files
authored
[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.
1 parent 6d2b44d commit b486210

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,9 @@ if(USE_CUDA AND USE_NVTX)
895895
endif()
896896

897897
if(USE_CUDA AND USE_NCCL)
898-
target_link_libraries(tvm PRIVATE nccl)
899-
target_link_libraries(tvm_runtime PRIVATE nccl)
898+
find_library(LIBRT rt)
899+
target_link_libraries(tvm PRIVATE nccl ${LIBRT})
900+
target_link_libraries(tvm_runtime PRIVATE nccl ${LIBRT})
900901
endif()
901902

902903
if(USE_ROCM AND USE_RCCL)

0 commit comments

Comments
 (0)