Skip to content
Open
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ce31566
Add first dummy version of NCCL backend
msimberg Nov 3, 2025
a4b913d
Clean up some unnecessary nccl files and try to port more mpi functio…
msimberg Nov 3, 2025
e14eeb3
Add todos
msimberg Nov 27, 2025
303ef54
Update nccl support
msimberg Dec 3, 2025
c01f1fe
Slightly more working nccl backend with events as requests and lots o…
msimberg Dec 18, 2025
11564e1
Enable one more nccl test
msimberg Dec 18, 2025
aca250b
Remove TODOs
msimberg Dec 19, 2025
ac03aaa
Add is_stream_aware, start_group, end_group to all backends
msimberg Dec 19, 2025
0331903
Clean up nccl event/request handling
msimberg Dec 19, 2025
3a4b321
Remove debugging print
msimberg Dec 19, 2025
325adf0
cleap
msimberg Dec 19, 2025
a724978
Clean up and disable some tests with NCCL
msimberg Dec 22, 2025
a13a3dd
Remove TODO
msimberg Dec 22, 2025
0c452c0
Add missing cuda_event.hpp file
msimberg Dec 22, 2025
162c745
Minor cleanup
msimberg Dec 22, 2025
15670aa
More cleanup
msimberg Dec 22, 2025
c1f70d0
Add missing stream argument
msimberg Jan 6, 2026
06d38ec
Add dummy stream parameter to libfabric and ucx backends
msimberg Jan 6, 2026
9653b59
Remove TODO from FindNCCL.cmake
msimberg Jan 6, 2026
3790aee
Remove TODO from test_locality.cpp
msimberg Jan 6, 2026
6e1c866
Add event pool and cached cuda event helper
msimberg Jan 7, 2026
9d38449
Remove duplicate key in clang-format config
msimberg Jan 8, 2026
46e0cf8
Format nccl files
msimberg Jan 8, 2026
b3359b3
Update src/nccl/nccl_communicator.hpp
msimberg Mar 20, 2026
4248180
Add missing FindNCCL.cmake for package install
msimberg Mar 19, 2026
2fabf67
Explicitly link against CUDA::cudart with NCCL
msimberg Mar 19, 2026
54fd8fe
Cleanup and check for device buffers with NCCL
msimberg Mar 20, 2026
b0a8228
Use plain throw to rethrow exception
msimberg Mar 20, 2026
4d60913
Handle shared/static NCCL library better
msimberg Mar 20, 2026
d68f893
Use [[maybe_unused]] for unused stream arguments
msimberg Mar 20, 2026
5ae81d4
Add helper to check if in active NCCL group
msimberg Mar 20, 2026
0c98a0e
Disallowing calling progress/wait while in an active NCCL group
msimberg Mar 20, 2026
a5bfaa8
Remove todo
msimberg Mar 20, 2026
c831f5d
Update readme
msimberg Mar 20, 2026
452074b
Add test for NCCL group semantics wrt wait/progress
msimberg Mar 23, 2026
0761f70
Fix nccl progress/wait check
msimberg Mar 23, 2026
fc5a14f
Clean up test_send_recv
msimberg Mar 23, 2026
e616b9f
Remove TODO about multiple nccl plugin inits (fixed in newer versions)
msimberg Mar 23, 2026
8cf11af
Remove extra parenthesis
msimberg Mar 23, 2026
3f4dc08
Make get_transport_option const
msimberg Mar 23, 2026
42f7163
Revert tag changes in test_send_multi
msimberg Mar 23, 2026
e41e726
Revert tag changes in test_locality.cpp
msimberg Mar 23, 2026
84cc2f4
Fix another get_transport_option
msimberg Mar 23, 2026
1dc6cfa
Remove old test
msimberg Mar 23, 2026
d3b6b96
Add notes about NCCL to readme
msimberg Mar 23, 2026
2121de0
Update test_send_recv for NCCL
msimberg Mar 23, 2026
6db091c
Remove device buffer check for NCCL communicator
msimberg Mar 23, 2026
edc6c32
Remove todo
msimberg Mar 23, 2026
11c6c4b
Expand readme with more nccl info
msimberg Mar 23, 2026
ab051d8
Clean up nccl backend
msimberg Mar 23, 2026
dff4b8f
Add missing const
msimberg Mar 23, 2026
2509800
Add missing find_dependency(NCCL) to oomphConfig.cmake.in
msimberg Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ BreakBeforeBraces: Allman
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
BreakConstructorInitializers: BeforeComma
ConstructorInitializerIndentWidth: 0
BreakInheritanceList: BeforeComma
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #58 for this.

#AllowShortBlocksOnASingleLine: Always
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ include(oomph_ucx)
# ---------------------------------------------------------------------
include(oomph_libfabric)

# ---------------------------------------------------------------------
# oomph NCCL variant
# ---------------------------------------------------------------------
include(oomph_nccl)

# ---------------------------------------------------------------------
# main src subdir
# ---------------------------------------------------------------------
Expand Down Expand Up @@ -142,6 +147,7 @@ install(
${CMAKE_CURRENT_BINARY_DIR}/oomphConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/oomphConfigVersion.cmake
${CMAKE_CURRENT_LIST_DIR}/cmake/FindLibfabric.cmake
${CMAKE_CURRENT_LIST_DIR}/cmake/FindNCCL.cmake
${CMAKE_CURRENT_LIST_DIR}/cmake/FindUCX.cmake
${CMAKE_CURRENT_LIST_DIR}/cmake/FindPMIx.cmake
DESTINATION
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# OOMPH

**Oomph** is a library for enabling high performance point-to-point, asynchronous communication over
different fabrics. It leverages the ubiquitos MPI library as well as UCX and Libfabric. Both
device and host memory are supported. Under the hood it uses
[hwmalloc](https://github.com/ghex-org/hwmalloc) for memory registration.
different fabrics. It leverages the ubiquitous MPI library as well as UCX and Libfabric. Both
device and host memory are supported. A subset of functionality is also supported with NCCL. Under
the hood it uses [hwmalloc](https://github.com/ghex-org/hwmalloc) for memory registration.

**selling points**
- lightweight, fast
Expand Down
78 changes: 78 additions & 0 deletions cmake/FindNCCL.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# From https://github.com/pytorch/gloo/blob/main/cmake/Modules/Findnccl.cmake.

# Try to find NCCL
#
# The following variables are optionally searched for defaults
# NCCL_ROOT_DIR: Base directory where all NCCL components are found
# NCCL_INCLUDE_DIR: Directory where NCCL header is found
# NCCL_LIB_DIR: Directory where NCCL library is found
#
# The following are set after configuration is done:
# NCCL_FOUND
# NCCL_INCLUDE_DIRS
# NCCL_LIBRARIES
#
# The path hints include CUDA_TOOLKIT_ROOT_DIR seeing as some folks
# install NCCL in the same location as the CUDA toolkit.
# See https://github.com/caffe2/caffe2/issues/1601

set(NCCL_ROOT_DIR $ENV{NCCL_ROOT_DIR} CACHE PATH "Folder contains NVIDIA NCCL")

find_path(NCCL_INCLUDE_DIR
NAMES nccl.h
HINTS
${NCCL_INCLUDE_DIR}
${NCCL_ROOT_DIR}
${NCCL_ROOT_DIR}/include
${CUDA_TOOLKIT_ROOT_DIR}/include)

if(DEFINED ENV{USE_STATIC_NCCL} AND NOT "$ENV{USE_STATIC_NCCL}" STREQUAL "")
message(STATUS "USE_STATIC_NCCL detected. Linking against static NCCL library")
set(_use_static_nccl ON)
set(NCCL_LIBNAME "libnccl_static.a")
else()
set(_use_static_nccl OFF)
set(NCCL_LIBNAME "nccl")
endif()

find_library(NCCL_LIBRARY
NAMES ${NCCL_LIBNAME}
HINTS
${NCCL_LIB_DIR}
${NCCL_ROOT_DIR}
${NCCL_ROOT_DIR}/lib
${NCCL_ROOT_DIR}/lib/x86_64-linux-gnu
${NCCL_ROOT_DIR}/lib64
${CUDA_TOOLKIT_ROOT_DIR}/lib64)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NCCL DEFAULT_MSG NCCL_INCLUDE_DIR NCCL_LIBRARY)

if (NCCL_FOUND)
set(NCCL_HEADER_FILE "${NCCL_INCLUDE_DIR}/nccl.h")
message(STATUS "Determining NCCL version from the header file: ${NCCL_HEADER_FILE}")
file (STRINGS ${NCCL_HEADER_FILE} NCCL_MAJOR_VERSION_DEFINED
REGEX "^[ \t]*#define[ \t]+NCCL_MAJOR[ \t]+[0-9]+.*$" LIMIT_COUNT 1)
if (NCCL_MAJOR_VERSION_DEFINED)
string (REGEX REPLACE "^[ \t]*#define[ \t]+NCCL_MAJOR[ \t]+" ""
NCCL_MAJOR_VERSION ${NCCL_MAJOR_VERSION_DEFINED})
message(STATUS "NCCL_MAJOR_VERSION: ${NCCL_MAJOR_VERSION}")
endif()
set(NCCL_INCLUDE_DIRS ${NCCL_INCLUDE_DIR})
set(NCCL_LIBRARIES ${NCCL_LIBRARY})
message(STATUS "Found NCCL (include: ${NCCL_INCLUDE_DIRS}, library: ${NCCL_LIBRARIES})")
mark_as_advanced(NCCL_ROOT_DIR NCCL_INCLUDE_DIRS NCCL_LIBRARIES)

if(NOT TARGET NCCL::nccl AND NCCL_FOUND)
if(_use_static_nccl)
add_library(NCCL::nccl STATIC IMPORTED)
else()
add_library(NCCL::nccl SHARED IMPORTED)
endif()
set_target_properties(NCCL::nccl PROPERTIES
IMPORTED_LOCATION ${NCCL_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${NCCL_INCLUDE_DIRS}
)
endif()
endif()

19 changes: 19 additions & 0 deletions cmake/oomph_nccl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# set all NCCL related options and values

#------------------------------------------------------------------------------
# Enable NCCL support
#------------------------------------------------------------------------------
set(OOMPH_WITH_NCCL OFF CACHE BOOL "Build with NCCL backend")

if (OOMPH_WITH_NCCL)
find_package(CUDAToolkit REQUIRED)
find_package(NCCL REQUIRED)
add_library(oomph_nccl SHARED)
add_library(oomph::nccl ALIAS oomph_nccl)
oomph_shared_lib_options(oomph_nccl)
target_link_libraries(oomph_nccl PUBLIC NCCL::nccl CUDA::cudart)
install(TARGETS oomph_nccl
EXPORT oomph-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
Loading
Loading