Skip to content

Commit

Permalink
Export NCCL dependency as part of raft::distributed. (#1077)
Browse files Browse the repository at this point in the history
This is a follow-up to #1032 to include NCCL in raft::distributed so that all communications libraries are now cleanly encapsulated in a single interface dependency, allowing us to remove it from the raft-dask Python build and simplifying the process for other consumers.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #1077
  • Loading branch information
vyasr authored Dec 9, 2022
1 parent 266deb5 commit 5689c75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 38 deletions.
12 changes: 11 additions & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,20 @@ endif()

set_target_properties(raft_distributed PROPERTIES EXPORT_NAME distributed)

rapids_find_generate_module(
NCCL
HEADER_NAMES nccl.h
LIBRARY_NAMES nccl
BUILD_EXPORT_SET raft-distributed-exports
INSTALL_EXPORT_SET raft-distributed-exports
)

rapids_export_package(BUILD ucx raft-distributed-exports)
rapids_export_package(INSTALL ucx raft-distributed-exports)
rapids_export_package(BUILD NCCL raft-distributed-exports)
rapids_export_package(INSTALL NCCL raft-distributed-exports)

target_link_libraries(raft_distributed INTERFACE ucx::ucp)
target_link_libraries(raft_distributed INTERFACE ucx::ucp NCCL::NCCL)

# ##################################################################################################
# * install targets-----------------------------------------------------------
Expand Down
34 changes: 0 additions & 34 deletions python/raft-dask/cmake/thirdparty/get_nccl.cmake

This file was deleted.

4 changes: 1 addition & 3 deletions python/raft-dask/raft_dask/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
# the License.
# =============================================================================

include(${raft-dask-python_SOURCE_DIR}/cmake/thirdparty/get_nccl.cmake)

set(cython_sources comms_utils.pyx nccl.pyx)
set(linked_libraries raft::raft raft::distributed NCCL::NCCL)
set(linked_libraries raft::raft raft::distributed)
rapids_cython_create_modules(
SOURCE_FILES "${cython_sources}" ASSOCIATED_TARGETS raft LINKED_LIBRARIES "${linked_libraries}"
CXX
Expand Down

0 comments on commit 5689c75

Please sign in to comment.