Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
86f6d6b
Add support uccl-backend for NIXL
praveingk Oct 10, 2025
cd2bbea
Cleanup and minor changes to readme
praveingk Oct 10, 2025
7e211cb
Further cleanup including moving startListener to private
praveingk Oct 10, 2025
b5e3c5b
Revert changes to plugin manager test
praveingk Oct 10, 2025
9648e6e
Fix formatting
praveingk Oct 13, 2025
489ecd0
Add more details to readme
praveingk Oct 13, 2025
25da211
Remove trailing whitespaces in readme
praveingk Oct 13, 2025
baa7c85
Remove trailing whitespaces in test
praveingk Oct 13, 2025
db047c0
Remove num_cpus from agent config
praveingk Oct 13, 2025
524e078
Fix typo in uccl backend
praveingk Oct 13, 2025
be90f7f
Merge branch 'main' into uccl-backend-pr
praveingk Oct 13, 2025
dde50c5
Add UCCL to test_plugin
praveingk Oct 27, 2025
7eb674c
Modify env vars descriptions and road map to README
praveingk Oct 27, 2025
a972a7c
Merge branch 'main' into uccl-backend-pr
praveingk Oct 27, 2025
96866cd
Remove custom parameter device_idx
praveingk Oct 30, 2025
06c74a1
Merge branch 'uccl-backend-pr' of github.com:praveingk/nixl-uccl into…
praveingk Oct 30, 2025
c6b0880
Merge branch 'main' into uccl-backend-pr
brminich Nov 18, 2025
bc6b191
Rename to UCCL P2P
praveingk Nov 21, 2025
6598040
Merge branch 'uccl-backend-pr' of github.com:praveingk/nixl-uccl into…
praveingk Nov 21, 2025
835c636
Fix formatting
praveingk Nov 21, 2025
a582bce
Fix notifs to support pickled objects
praveingk Nov 27, 2025
0f87850
Add nixlbench support for UCCL_P2P
praveingk Nov 27, 2025
8493dd5
Fix format
praveingk Nov 27, 2025
649aee1
Address review comments
praveingk Nov 28, 2025
e185d9a
Change checkXfer logic to use a single pending transfer set
praveingk Nov 28, 2025
52ec4ec
Fix broken link
praveingk Dec 1, 2025
4cdb6b3
Change to p2p link
praveingk Dec 1, 2025
57c2d46
Enable rcmode for write operations
praveingk Dec 2, 2025
47bfadb
Merge branch 'main' into uccl-backend-pr
praveingk Dec 3, 2025
a0ea16e
Merge branch 'uccl-backend-pr' of github.com:praveingk/nixl-uccl into…
praveingk Dec 3, 2025
c411e7e
Rename UCCL P2P to UCCL
praveingk Dec 4, 2025
b14fbc3
Add UCCL build and nixlbench
praveingk Dec 4, 2025
5df595f
Merge branch 'main' into uccl-backend-pr
praveingk Dec 4, 2025
376a01d
Install uccl build dependencies
praveingk Dec 5, 2025
7f652ee
Merge branch 'uccl-backend-pr' of github.com:praveingk/nixl-uccl into…
praveingk Dec 5, 2025
b630f96
Add pip install with break-system-packages
praveingk Dec 5, 2025
c96f51b
Add missing libraries for uccl build
praveingk Dec 8, 2025
9007b0a
Add dependency check for uccl build
praveingk Dec 8, 2025
40bb669
Run nixlbench for UCCL only if GPUs available
praveingk Dec 9, 2025
71ea935
Use HAS_GPU in build
praveingk Dec 9, 2025
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: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ option('etcd_inc_path', type: 'string', value: '', description: 'Path to ETCD He
option('etcd_lib_path', type: 'string', value: '', description: 'Path to ETCD Libraries')
option('disable_gds_backend', type : 'boolean', value : false, description : 'disable gds backend')
option('disable_mooncake_backend', type : 'boolean', value : false, description : 'disable mooncake backend')
option('disable_uccl_backend', type : 'boolean', value : false, description : 'disable uccl backend')
option('install_headers', type : 'boolean', value : true, description : 'install headers')
option('gds_path', type: 'string', value: '/usr/local/cuda/', description: 'Path to GDS CuFile install')
option('cudapath_inc', type: 'string', value: '', description: 'Include path for CUDA')
Expand Down
2 changes: 2 additions & 0 deletions src/api/python/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ def __init__(
init["num_threads"] = str(nixl_conf.num_threads)
elif bknd == "GDS_MT":
init["thread_count"] = str(nixl_conf.num_threads)
elif bknd == "Uccl":
init["num_cpus"] = str(nixl_conf.num_threads)
self.create_backend(bknd, init)

self.nixl_mems = {
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ if libtransfer_engine.found() and not get_option('disable_mooncake_backend')
subdir('mooncake')
endif

libuccl_engine = cc.find_library('uccl_engine', required: false)
if libuccl_engine.found() and not get_option('disable_uccl_backend')
subdir('uccl')
endif

hf3fs_lib_path = '/usr/lib/'
hf3fs_lib_file = 'hf3fs_api_shared'
hf3fs_lib_found = cc.find_library(hf3fs_lib_file, dirs: [hf3fs_lib_path], required: false)
Expand Down
53 changes: 53 additions & 0 deletions src/plugins/uccl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## UCCL Backend Plugin [Preview]

[UCCL](https://github.com/uccl-project/uccl) is an efficient communication library to perform GPU memory transfers, with a focus on flexibility (evolving ML workloads) and portability (heteregenous GPUs). UCCL provides a software transport stack which runs on the CPUs and are easily extensible to support different techniques like congestion control, multipathing, efficient loss recovery, etc.
UCCL supports collectives, p2p communication and gpu-driven communication for expert parallelism.

## Capabilities

Currently, the UCCL backend supports internode communication over RDMA. Intranode communication will be added soon.

## Installation Guide

1. Install UCCL's p2p engine manually. You can refer to the [installation guide here](https://https://github.com/uccl-project/uccl).

```cpp
git clone https://github.com/uccl-project/uccl.git
cd uccl/p2p
make -j
sudo make install
```

2. Build NIXL using regular method as in [README](https://github.com/ai-dynamo/nixl/blob/main/README.md) ensuring `disable_uccl_backend` is set to `false`.

## Usage Guide

Example Usage to create a NIXL agent with uccl engine:

```python
config = nixl_agent_config(backends=["UCCL"])
agent = nixl_agent("agent-name", config)
```
UCCL engine would auto discover the right NIC to be used for the GPU based on the PCIe distance during memory registration based on the data locality.

### Environment Variables

Refer to [README](https://github.com/uccl-project/uccl/tree/main/collective/rdma#environment-variables-in-uccl) for the complete list of environment variables that can be set to customize UCCL.

**Important**: For `NIXL_READ` operations set `UCCL_RCMODE=1`. By default, UCCL uses RDMA UC (Unreliable Connection). However, `READ` operations need to operate on RDMA RC (Reliable Connection).

### Usage References

1) [NIXL Benchmark](https://github.com/uccl-project/uccl/blob/main/p2p/benchmarks/benchmark_nixl.py) in UCCL: Refer to this [README](https://github.com/uccl-project/uccl/tree/main/p2p) on how to run the script.

2) [NIXL connector](https://github.com/praveingk/vllm/commit/fa67cd7edff076fee4914cc316a9833c2311a65d) in vLLM. vLLM's NIXL connector uses `NIXL_READ` operations, hence set env `UCCL_RCMODE` to 1.

### Road Map

- [ ] Add Intra-node communication support

- [ ] Add Progress Thread support

- [ ] Add asynchronous posting of reads over multiple workers to mitigate latency increase upon fragmentation

- [ ] Add support for other transport (TCP, TCP-X, etc.)
48 changes: 48 additions & 0 deletions src/plugins/uccl/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cpp = meson.get_compiler('cpp')
uccl_lib = cpp.find_library('uccl_engine')

compile_flags = []


if 'UCCL' in static_plugins
uccl_backend_lib = static_library('UCCL',
'uccl_backend.cpp', 'uccl_backend.h', 'uccl_plugin.cpp',
dependencies: [nixl_infra, serdes_interface, cuda_dep, uccl_lib, nixl_common_dep],
include_directories: nixl_inc_dirs,
install: false,
cpp_args : compile_flags,
name_prefix: 'libplugin_') # Custom prefix for plugin libraries
else
uccl_backend_lib = shared_library('UCCL',
'uccl_backend.cpp', 'uccl_backend.h', 'uccl_plugin.cpp',
dependencies: [nixl_infra, serdes_interface, cuda_dep, uccl_lib, nixl_common_dep],
include_directories: [nixl_inc_dirs, utils_inc_dirs],
install: true,
cpp_args : compile_flags + ['-fPIC'],
name_prefix: 'libplugin_', # Custom prefix for plugin libraries
install_dir: plugin_install_dir)

if get_option('buildtype') == 'debug'
run_command('sh', '-c',
'echo "UCCL=' + uccl_backend_lib.full_path() + '" >> ' + plugin_build_dir + '/pluginlist',
check: true
)
endif
endif

uccl_backend_interface = declare_dependency(link_with: uccl_backend_lib)
Loading