Skip to main content

NVIDIA Inference Xfer Library (NIXL)

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.

License GitHub Release

Documentation and Resources

  • NIXL overview - Core concepts/architecture overview (docs/nixl.md)

  • Python API - Python API usage and examples (docs/python_api.md)

  • Backend guide - Backend/plugin development guide (docs/BackendGuide.md)

  • Telemetry - Observability and telemetry details (docs/telemetry.md)

  • Doxygen guide - API/class diagrams overview (docs/doxygen/nixl_doxygen.md)

  • Doxygen images - Diagram assets (docs/doxygen/)

  • NIXLBench docs - Benchmark usage guide (benchmark/nixlbench/README.md)

  • 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).

Ubuntu:

$ sudo apt install build-essential cmake pkg-config

Fedora:

$ sudo dnf install gcc-c++ cmake pkg-config

Python

$ pip3 install meson ninja pybind11 tomlkit

UCX

NIXL was tested with UCX version 1.22.x.

GDRCopy is available on Github and is necessary for maximum performance, but UCX and NIXL will work without it.

$ git clone https://github.com/openucx/ucx.git
$ cd ucx
$ git checkout v1.22.x
$ ./autogen.sh
$ ./contrib/configure-release-mt       \
    --enable-shared                    \
    --disable-static                   \
    --disable-doxygen-doc              \
    --enable-optimizations             \
    --enable-cma                       \
    --enable-devel-headers             \
    --with-cuda=<cuda install>         \
    --with-verbs                       \
    --with-dm                          \
    --with-gdrcopy=<gdrcopy install>
$ make -j
$ make -j install-strip
$ ldconfig

ETCD (Optional)

NIXL can use ETCD for metadata distribution and coordination between nodes in distributed environments. To use ETCD with NIXL:

ETCD Server and Client

$ sudo apt install etcd etcd-server etcd-client

# Or use Docker
$ docker run -d -p 2379:2379 quay.io/coreos/etcd:v3.5.1

ETCD CPP API

Installed from https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3

$ sudo apt install libgrpc-dev libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc
$ sudo apt install libcpprest-dev
$ git clone https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git
$ cd etcd-cpp-apiv3
$ mkdir build && cd build
$ cmake ..
$ make -j$(nproc) && make install

Additional plugins

Some plugins may have additional build requirements, see them here:

Getting started

Build & install

$ meson setup <name_of_build_dir>
$ cd <name_of_build_dir>
$ ninja
$ ninja install

Build Options

Release build (default)

$ meson setup <name_of_build_dir>

Debug build

$ meson setup <name_of_build_dir> --buildtype=debug

NIXL-specific build options

# Example with custom options
$ meson setup <name_of_build_dir> \
    -Dbuild_docs=true \           # Build Doxygen documentation
    -Ducx_path=/path/to/ucx \     # Custom UCX installation path
    -Dinstall_headers=true \      # Install development headers
    -Ddisable_gds_backend=false   # Enable GDS backend

Common build options:

  • build_docs: Build Doxygen documentation (default: false)
  • ucx_path: Path to UCX installation (default: system path)
  • install_headers: Install development headers (default: true)
  • disable_gds_backend: Disable GDS backend (default: false)
  • cudapath_inc, cudapath_lib: Custom CUDA paths
  • 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 for the benchmark suite lives in nixlbench — see PR #1647 for the use_rocm / rocm_path options there. When packaging a ROCm wheel, pass -Dwheel_variant=rocm so the wheel is named nixl_rocm.

Plugins on ROCm hosts (CUDA toolchain absent):

  • UCX — primary transport for AMD GPU memory (requires UCX built with --with-rocm).
  • POSIX, OBJ, AZURE_BLOB, HF3FS, MOONCAKE, GUSLI, UCCL — vendor-neutral; build unchanged.
  • 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):

  • nixlbench (the NIXL benchmark tool) needs CUDA-driver-API → HIP translation work before it builds on ROCm. Use examples/cpp/nixl_etcd_example for transfer validation in the meantime.
  • 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.

Installation from source

Prerequisites:

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.

Example with uv Python virtual environment:

curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:${PATH}"

uv venv .venv --python 3.12
source .venv/bin/activate
uv pip install tomlkit

Example with python-virtualenv:

curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:${PATH}"

python3 -m venv .venv
source .venv/bin/activate
pip install tomlkit

Example with system-wide Python installation without using a virtual environment:

curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:${PATH}"

pip install tomlkit

Then install PyTorch following the instructions on the PyTorch website: https://pytorch.org/get-started/locally/

After installing the prerequisites, you can build and install the NIXL binaries and the Python bindings from source. You have to:

  1. Build NIXL binaries and install them
  2. Build and install the CUDA platform-specific package (nixl-cu12 or nixl-cu13)
  3. Build and install the nixl meta-package

For CUDA 12:

pip install .
meson setup build
ninja -C build install
pip install build/src/bindings/python/nixl-meta/nixl-*-py3-none-any.whl

For CUDA 13:

pip install .
./contrib/tomlutil.py --wheel-name nixl-cu13 pyproject.toml
meson setup build
ninja -C build install
pip install build/src/bindings/python/nixl-meta/nixl-*-py3-none-any.whl

To check if the installation is successful, you can run the following command:

python3 -c "import nixl; agent = nixl.nixl_agent('agent1')"

which should print:

2026-01-08 13:36:27 NIXL INFO    _api.py:363 Backend UCX was instantiated
2026-01-08 13:36:27 NIXL INFO    _api.py:253 Initialized NIXL agent: agent1

You can also run a complete Python example to test the installation:

python3 examples/python/expanded_two_peers.py --mode=target --use_cuda=true --ip=127.0.0.1 --port=4242 &
sleep 5
python3 examples/python/expanded_two_peers.py --mode=initiator --use_cuda=true --ip=127.0.0.1 --port=4242

For more Python examples, see examples/python/.

Rust Bindings

Build

  • Use -Drust=true meson option to build rust bindings.
  • Use --buildtype=debug for a debug build (default is release).
  • Or build manually:
    $ cargo build --release
    

Install

The bindings will be installed under nixl-sys in the configured installation prefix. Can be done using ninja, from project build directory:

$ ninja install

Test

# Rust bindings tests
$ cargo test

Use in your project by adding to Cargo.toml:

[dependencies]
nixl-sys = { path = "path/to/nixl/bindings/rust" }

Other build options

See contrib/README.md for more build options.

Building Docker container

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

Code Examples

Contributing

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).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nixl_cu12-1.4.1-cp314-cp314-manylinux_2_28_x86_64.whl (79.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

nixl_cu12-1.4.1-cp314-cp314-manylinux_2_28_aarch64.whl (77.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

nixl_cu12-1.4.1-cp313-cp313-manylinux_2_28_x86_64.whl (79.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

nixl_cu12-1.4.1-cp313-cp313-manylinux_2_28_aarch64.whl (77.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

nixl_cu12-1.4.1-cp312-cp312-manylinux_2_28_x86_64.whl (79.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

nixl_cu12-1.4.1-cp312-cp312-manylinux_2_28_aarch64.whl (77.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

nixl_cu12-1.4.1-cp311-cp311-manylinux_2_28_x86_64.whl (79.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

nixl_cu12-1.4.1-cp311-cp311-manylinux_2_28_aarch64.whl (77.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

nixl_cu12-1.4.1-cp310-cp310-manylinux_2_28_x86_64.whl (79.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

nixl_cu12-1.4.1-cp310-cp310-manylinux_2_28_aarch64.whl (77.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

File details

Details for the file nixl_cu12-1.4.1-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5e529ca12c266c507e74e306c65eccf895595c1ae62a13e0549956e7357633c
MD5 33a509137eb1492f0539803073fe70c3
BLAKE2b-256 cb892db296614efb7160b191f91cea3730e44a11bf2f21e0547f52e1dec79e8f

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 93433671976a17671cb07b9869eaf9a6e2521974f9f180ec677ad65c236a14da
MD5 4fbfef000978fcae75c157a6cd18caeb
BLAKE2b-256 5181561d8400e82b3efbe7fa9db1828f8554e813ba1d4ef1c7af782b302a5ab6

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3aad860bed5686052c54f83bbcdd46de43cf5fcf87110aaf1fbbe09a4d6badce
MD5 17643b465ec91e31b2a5604f8d275c77
BLAKE2b-256 b3a7af49301412e85694172b53b499cce4ba0024f11dd57a973678850310ca3e

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 207e6f7f28c5e4f0419f1cfd5e66708fde8d9e070670d724941489baeb197d42
MD5 d7e7c8c19b5ec8f030c7555314044bfa
BLAKE2b-256 a38f6e115224d24d0683370f52a1ac2def237a056a5f57b791b89067b3a31246

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bc3d4f99c85375c7836beef3736f038473c183aca16cb115131c61eb7240ba33
MD5 c4fda45e2cbd9896886c32e95f8f073e
BLAKE2b-256 c70a977f05f15cb8ff080c106303633c46585c4fa10687e3dc64b0cd24fa56b1

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8e5e42176d521fa01a4d88366f51e5085a0037b049e8c6a1e5e46a46f0aa84c7
MD5 935a2c2063e1591eb52eee2522c11945
BLAKE2b-256 0a5af601f1bc354bea37e5387e1ec899792bd498cc4f23eb9f10729bedd95f1e

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cbdee61e963002bcf7f84f22a85ff77b938616ba2c9c7733da5868ecea26fb58
MD5 9e1522f6e3d1cdad485d3064ab630838
BLAKE2b-256 25c8df62209657ed1b3c286e582a72bf3ffabcb551f18ea5b7958b149754c88c

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 de2b2a845b0cf3da4a4bb9101b8eff4bcbfccf2e02cbdb43a0e4c9b37c7a79c8
MD5 3ddb8d78d5fcb9c7693e10e0c4748254
BLAKE2b-256 feb5938d9dadb5ac74d6bfdbbbb71574f17829d555dea66ed973191e29aa33d3

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a2f33af6b9b65e414c8c7632009f7691d5caca27f3be3182ec485d11796820d1
MD5 e66ff63a537ae7b659e15621bb42dca9
BLAKE2b-256 ae4ca7f3bfca9f3e33ac4f902e192612aa3b8154b5a7bac3d95125020f69aa59

See more details on using hashes here.

File details

Details for the file nixl_cu12-1.4.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for nixl_cu12-1.4.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ef22926b3f7652414c786b3c54b3f96e0729a269cf998cf2ec5e6d64a46efe7e
MD5 f4223acf98b5c2e496eeb4d11cb04a16
BLAKE2b-256 425e31d839f83649f9d2c166e1fa541cfe2f187d1d0647b1567ea5599e621334

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.1 This release

10 files

1.4.0

10 files

1.3.2

10 files

1.3.1

10 files

1.3.0

10 files

1.2.0

10 files

1.1.0

10 files

1.0.1

10 files

1.0.0

10 files

0.10.1

10 files

0.10.0

10 files

0.9.0

10 files

0.8.0

10 files

0.7.1

8 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page