NVIDIA Inference Xfer Library (NIXL) is targeted for accelerating point to point communications in AI inference frameworks such as NVIDIA Dynamo, while providing an abstraction over various types of memory (e.g., CPU and GPU) and storage (e.g., file, block and object store) through a modular plug-in architecture.
KVBench docs - KVBench workflows and tutorials (benchmark/kvbench/docs/)
Supported Platforms
NIXL is supported on a Linux environment only. It is tested on Ubuntu (22.04/24.04) and Fedora. macOS and Windows are not currently supported; use a Linux host or container/VM.
Pre-build Distributions
PyPI Wheel
The nixl python API and libraries, including UCX, are available directly through PyPI.
For example, if you have a GPU running on a Linux host, container, or VM, you can do the following install:
Install with:
pip install nixl
This installs both CUDA 12 and CUDA 13 backends. At runtime, the correct backend is selected automatically based on the CUDA version reported by PyTorch.
Prerequisites for source build (Linux)
NIXL requires a C++20 compatible compiler (GCC >= 11 or Clang >= 14).
static_plugins: Comma-separated list of plugins to build statically
enable_plugins: Comma-separated list of plugins to build (e.g. -Denable_plugins=UCX,POSIX). Cannot be used with disable_plugins.
disable_plugins: Comma-separated list of plugins to exclude (e.g. -Ddisable_plugins=GDS). Cannot be used with enable_plugins.
wheel_variant: Override the Python wheel variant suffix (e.g. -Dwheel_variant=rocm yields nixl_rocm). Empty (default) = autodetect from the CUDA major version.
Building for AMD ROCm
NIXL itself builds vendor-neutrally; CPU-side hardware detection (hwInfo::numAmdGpus) discovers AMD GPUs via PCI vendor 0x1002 whether or not a ROCm toolchain is present. GPU-side ROCm/HIP build support is available for nixlbench and UCX plugin unit tests. When packaging a ROCm wheel, pass -Dwheel_variant=rocm so the wheel is named nixl_rocm.
Building with ROCm support:
# For UCX unit tests with ROCm
$ meson setup build -Drocm_path=/opt/rocm
# Or specify a custom ROCm path
$ meson setup build -Drocm_path=/custom/path/to/rocm
Plugins on ROCm hosts (CUDA toolchain absent):
UCX — primary transport for AMD GPU memory (requires UCX built with --with-rocm).
GDS / GDS_MT, GPUNETIO, LIBFABRIC (with -DHAVE_CUDA) — skip automatically because their CUDA / cuFile / DOCA dependencies are not found.
Known gaps (will be addressed in follow-up PRs):
LIBFABRIC plugin disabled on ROCm pending header refactor.
No NVSHMEM-equivalent backend yet (rocSHMEM analog is a candidate for a future plugin).
Environment Variables
There are a few environment variables that can be set to configure the build:
NIXL_NO_STUBS_FALLBACK: If not set or 0, build NIXL stub library if the library build fails
Building Documentation
If you have Doxygen installed, you can build the documentation:
# Configure with documentation enabled
$ meson setup <name_of_build_dir> -Dbuild_docs=true
$ cd <name_of_build_dir>
$ ninja
# Documentation will be generated in <name_of_build_dir>/html
# After installation (ninja install), documentation will be available in <prefix>/share/doc/nixl/
Python Interface
NIXL provides Python bindings through pybind11. For detailed Python API documentation, see docs/python_api.md.
The preferred way to install the Python bindings is through pip from PyPI:
pip install nixl
This installs both CUDA 12 and CUDA 13 backends. At runtime, the correct backend is selected automatically based on the CUDA version reported by PyTorch.
uv is always required even if you have another kind of Python virtual environment manager or if you are using a system-wide Python installation without using a virtual environment.
To build the docker container, first clone the current repository. Also make sure you are able to pull docker images to your machine before attempting to build the container.
Run the following from the root folder of the cloned NIXL repository:
$ ./contrib/build-container.sh
By default, the container is built with Ubuntu 24.04. To build a container for Ubuntu 22.04 use the --os option as follows:
$ ./contrib/build-container.sh --os ubuntu22
To see all the options supported by the container use:
$ ./contrib/build-container.sh -h
The container has the NIXL python bindings preinstalled (built from source against the container's own PyTorch). For a redistributable python wheel, use the wheel build script below or install the published nixl package.
Building the python wheel
The contrib folder also includes a script to build the python wheel with the UCX dependencies. Note, that UCX and other NIXL dependencies are required to be installed.
$ ./contrib/build-wheel.sh
Running with ETCD
NIXL can use ETCD for metadata exchange between distributed nodes. This is especially useful in containerized or cloud-native environments.
Environment Setup
To use ETCD with NIXL, set the following environment variables:
# Set ETCD endpoints (required) - replace localhost with the hostname of the etcd server
export NIXL_ETCD_ENDPOINTS="http://localhost:2379"
# Set ETCD namespace (optional, defaults to /nixl/agents)
export NIXL_ETCD_NAMESPACE="/nixl/agents"
Running the ETCD Example
NIXL includes an example demonstrating metadata exchange and data transfer using ETCD:
# Start an ETCD server if not already running
# For example:
# docker run -d -p 2379:2379 quay.io/coreos/etcd:v3.5.1
# Set the ETCD env variables as above
# Run the example. The two agents in the example will exchange metadata through ETCD
# and perform data transfers
./<nixl_build_path>/examples/nixl_etcd_example
nixlbench Benchmark
For more comprehensive testing, the nixlbench benchmarking tool supports ETCD for worker coordination:
# Build nixlbench (see benchmark/nixlbench/README.md for details)
cd benchmark/nixlbench
meson setup build && cd build && ninja
# Run benchmark with ETCD
./nixlbench --etcd-endpoints http://localhost:2379 --backend UCX --initiator_seg_type VRAM
For contribution guidelines, see CONTRIBUTING.md (CONTRIBUTING.md).
Third-Party Components
This project will download and install additional third-party open source software projects. Review the license terms of these open source projects before use.
NIXL Python wheels bundle NVIDIA modules (libuct_ib_mlx5_ext.so, libuct_ib_mlx5_gda.so, libuct_ib_mlx5_gdp.so) licensed under the NVIDIA Proprietary License (LicenseRef-NvidiaProprietary).
Alternatives
Use instead of nixl-cu13: tools that do the same job, closest first.