-
Notifications
You must be signed in to change notification settings - Fork 80
Add NIXL backend #6016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
x41lakazam
wants to merge
43
commits into
main
Choose a base branch
from
dispatch_combine/nixl_backend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,403
−7
Open
Add NIXL backend #6016
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
cf77bdb
first working dispatch and combine primitive for k=1
samnordmann 66e7811
add comments and cleanup
samnordmann dda9aa7
add kernel based a2av and cuda backend for d/c
samnordmann 7aa2de8
unstable - add nixl backend
x41lakazam 9a8a377
unstable
x41lakazam 0f21528
add python build changes for nixl
x41lakazam 6144827
fix typo
x41lakazam 04a9133
merge main
x41lakazam b32587a
restore main:
x41lakazam f8a94fc
fix bug where zero-length buffer was passed to nixl
x41lakazam a6b6f87
Reduce probe size to 1
x41lakazam 95460af
Address PR comments.
x41lakazam 41ec0ac
typos
x41lakazam d63ffd7
set getAgentName to inline
x41lakazam 86e5028
fix comments in nixl.cpp
x41lakazam 7283aa8
clean ifdef USE_NIXL statements
x41lakazam a085c54
inline exchangeMetadata inside registerTensors
x41lakazam 13ae58f
include deviceId (rank) inside TensorDesc
x41lakazam 149c15a
remove useless handleImpl.isPrepared
x41lakazam 1b41788
add thread yield in wait transfer loop
x41lakazam 2eccaa5
remove remote_rank from prepare transfer
x41lakazam 10d010a
add nixlbackend::impl when use_nixl is false
x41lakazam e9062a4
Move exchangeMetadata to private when USE_NIXL is false
x41lakazam 9047991
fix CI: clang-format, clang-tidy, and trailing newline
x41lakazam b3b5fbd
fix ci
x41lakazam b283c2a
fix CI
x41lakazam c4726d0
Separate device and rank in tensordesc for more clarity
x41lakazam 7ff4aae
fix linter
x41lakazam 0739240
Update cmake config
x41lakazam 5560230
Fix CI
x41lakazam ec01db9
Fix no-headers in NIXL install instructions (Cmake config)
x41lakazam 67a92f0
Replace NVFUSER_STANDALONE_BUILD_WITH_NIXL by NVFUSER_BUILD_WITH_NIXL
x41lakazam dae35aa
move nixl linkage from CmakeList to handle_nixl.cmake
x41lakazam a9fb56d
move TPL locs to handle_nixl.cmake
x41lakazam e364949
Fix - move nixl linkage to handle_nixl.cmake
x41lakazam f74078f
fix linter
x41lakazam 9847a11
Add NIXL to CI image
x41lakazam 40758d6
remove import nixl from install-nixl.sh
x41lakazam bf471ea
Add transitive shared libs deps for nixl
x41lakazam df6c384
Add nixl*.mesonpy.libs and nixl*.libs as shared lib dirs in CI's inst…
x41lakazam 1c10779
try to make nixl tests work
x41lakazam 5eca79f
remove nixl from clang build
x41lakazam deddb46
Merge branch 'main' into dispatch_combine/nixl_backend
x41lakazam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-present NVIDIA CORPORATION & AFFILIATES. | ||
| # All rights reserved. | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # NIXL Handler | ||
| # ------------------------------------------------------------------------------ | ||
|
|
||
| macro(handle_nixl) | ||
| message("") | ||
| message("Finding NIXL...") | ||
|
|
||
| if(NOT NVFUSER_BUILD_WITH_NIXL) | ||
| set(NIXL_FOUND FALSE) | ||
| message(STATUS "NIXL disabled (NVFUSER_BUILD_WITH_NIXL=OFF)") | ||
| else() | ||
| # User may need to set NIXL_PREFIX to the NIXL install directory. | ||
| find_path(NIXL_INCLUDE_DIR nixl.h | ||
| HINTS $ENV{NIXL_PREFIX}/include ENV CPATH | ||
| ) | ||
| find_library(NIXL_LIBRARY nixl | ||
| HINTS $ENV{NIXL_PREFIX}/lib $ENV{NIXL_PREFIX}/lib64 | ||
| $ENV{NIXL_PREFIX}/lib/x86_64-linux-gnu | ||
| $ENV{NIXL_PREFIX}/lib/aarch64-linux-gnu | ||
| ) | ||
| find_library(NIXL_BUILD_LIBRARY nixl_build | ||
| HINTS $ENV{NIXL_PREFIX}/lib $ENV{NIXL_PREFIX}/lib64 | ||
| $ENV{NIXL_PREFIX}/lib/x86_64-linux-gnu | ||
| $ENV{NIXL_PREFIX}/lib/aarch64-linux-gnu | ||
| ) | ||
|
|
||
| if(NIXL_INCLUDE_DIR AND NIXL_LIBRARY) | ||
| set(NIXL_FOUND TRUE) | ||
| message(STATUS "Found NIXL: ${NIXL_LIBRARY} (include: ${NIXL_INCLUDE_DIR})") | ||
| if(NIXL_BUILD_LIBRARY) | ||
| message(STATUS "Found NIXL build lib: ${NIXL_BUILD_LIBRARY}") | ||
| endif() | ||
|
|
||
| add_library(__nvfuser_nixl INTERFACE) | ||
| target_include_directories(__nvfuser_nixl INTERFACE ${NIXL_INCLUDE_DIR}) | ||
|
|
||
| get_filename_component(NIXL_LIB_DIR "${NIXL_LIBRARY}" DIRECTORY) | ||
| target_link_directories(__nvfuser_nixl INTERFACE ${NIXL_LIB_DIR}) | ||
| target_link_options(__nvfuser_nixl INTERFACE "LINKER:-rpath-link,${NIXL_LIB_DIR}") | ||
|
|
||
| target_link_libraries(__nvfuser_nixl INTERFACE ${NIXL_LIBRARY}) | ||
| if(NIXL_BUILD_LIBRARY) | ||
| target_link_libraries(__nvfuser_nixl INTERFACE ${NIXL_BUILD_LIBRARY}) | ||
| endif() | ||
| else() | ||
| set(NIXL_FOUND FALSE) | ||
| message(WARNING "NIXL not found – building without NIXL support. Set NIXL_PREFIX to the NIXL install directory.") | ||
| endif() | ||
|
|
||
| # CUDA major version constraint check | ||
| if(NIXL_FOUND AND Python_FOUND AND CUDAToolkit_FOUND) | ||
| execute_process( | ||
| COMMAND "${Python_EXECUTABLE}" -c "import nixl; print(nixl._pkg.__name__.split('_cu')[-1])" | ||
| OUTPUT_VARIABLE nixl_cuda_major | ||
| OUTPUT_STRIP_TRAILING_WHITESPACE | ||
| ERROR_QUIET | ||
| RESULT_VARIABLE nixl_cuda_result | ||
| ) | ||
|
|
||
| if(nixl_cuda_result EQUAL 0 AND NOT nixl_cuda_major STREQUAL "") | ||
| set(NIXL_CUDA_VERSION "${nixl_cuda_major}") | ||
| set(cuda_toolkit_major "${CUDAToolkit_VERSION_MAJOR}") | ||
|
|
||
| if(NOT nixl_cuda_major STREQUAL cuda_toolkit_major) | ||
| set(NIXL_CUDA_constraint_status "mismatch") | ||
| set(NIXL_CUDA_constraint_found "${nixl_cuda_major}") | ||
| set(NIXL_CUDA_constraint_required "${cuda_toolkit_major}") | ||
| message(WARNING "NIXL CUDA major version mismatch: NIXL built for CUDA ${nixl_cuda_major}, but CUDAToolkit major is ${cuda_toolkit_major}") | ||
| else() | ||
| set(NIXL_CUDA_constraint_status "match") | ||
| set(NIXL_CUDA_constraint_version "${nixl_cuda_major}") | ||
| endif() | ||
| else() | ||
| set(NIXL_CUDA_constraint_status "not_available") | ||
| endif() | ||
| else() | ||
| set(NIXL_CUDA_constraint_status "not_available") | ||
| endif() | ||
| endif() | ||
|
|
||
| set_dependency_report_status(NIXL) | ||
| endmacro() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please report this in
cmake/deps/handle_nixl.cmake