MIXL is a point-to-point transfer library for Moore Threads GPU clusters. It keeps the NIXL plug-in model and adds a MUSA deviceOps backend so host-side registration and copies can use MUSA device memory.
MIXL is derived from the NIXL project developed by NVIDIA Corporation and other contributors. API names, environment variables, and plug-in interfaces from that project are unchanged.
The MIXL GitHub repository uses main as its default branch, following upstream NIXL.
- A supported Moore Threads GPU
- MUSA Driver and MUSA Toolkit
- A C++20 compiler (GCC 11 or newer, or Clang 14 or newer), CMake, pkg-config, Meson, and Ninja
- A matching MTUCX build from its
masterbranch (based on UCX 1.20.0)
Install the MUSA Toolkit and driver from the official documentation before building MIXL:
The public build examples use MUSA_HOME=/usr/local/musa.
- GDRCopy: optional for MTUCX. Validate it separately on the target environment before relying on it for MUSA transfers.
- ETCD: used for metadata exchange between nodes. The default build does not require it.
- PyTorch and
uv: required only when building the Python bindings from source.
MIXL is supported on Linux. The MUSA validation covered S5000 with MUSA 5.3.0, including cross-OS MUSA Fabric transfers over MTLink. The Ubuntu and Fedora commands below are build examples.
Install the host toolchain and the MUSA MTML development package (mtml.h and libmtml), then build the matching MTUCX master branch. GDRCopy is optional.
Ubuntu:
sudo apt install build-essential cmake pkg-config autoconf automake libtool
pip3 install meson ninja pybind11 tomlkitFedora:
sudo dnf install gcc-c++ cmake pkg-config autoconf automake libtool make
pip3 install meson ninja pybind11 tomlkitMTUCX:
git clone https://github.com/MooreThreads/mtucx.git mucx
cd mucx
git checkout master
./autogen.sh
MUCX_PREFIX="$PWD/install"
./contrib/configure-release \
--prefix="$MUCX_PREFIX" \
--disable-doxygen-doc \
--enable-mt \
--enable-devel-headers \
--enable-optimizations \
--with-musa=/usr/local/musa
make -j"$(nproc)"
make installTo build MTUCX with GDRCopy, add --with-gdrcopy=<gdrcopy install>.
From the MIXL repository's main branch, configure and build with the public MUSA prefix:
export MUSA_HOME=/usr/local/musa
export MUCX_PREFIX=/path/to/mucx/install
meson setup build \
--prefix="$PWD/install" \
--buildtype=release \
-Ducx_path="$MUCX_PREFIX" \
-Dmusapath_inc="${MUSA_HOME}/include" \
-Dmusapath_lib="${MUSA_HOME}/lib" \
-Duse_musa=true
ninja -C buildMUSA is also detected from pkg-config musa, then $MUSA_HOME, then /usr/local/musa, when -Dmusapath_inc and -Dmusapath_lib are left empty. If both MUSA and CUDA are installed, pass -Duse_musa=true so tests and nixlbench prefer MUSA. The default is false.
For a MUSA build, point -Ducx_path at the matching MTUCX installation shown
above. The MUSA UCX plugin requires UCS_MEMORY_TYPE_MUSA from its headers.
The MUSA build provides host-side device and mapped-memory allocation and copies through libnixl_device_ops_musa.so. The UCX plug-in and unit tests then build with MUSA VRAM support. CUDA-only plug-ins (GDS, GPUNETIO, and LIBFABRIC with CUDA) are skipped when their CUDA dependencies are absent. GPU-side .cu kernels remain CUDA-only.
MUSA device and mapped-memory operations are provided by libnixl_device_ops_musa.so.
Cross-OS MUSA Fabric allocation and RMA are provided jointly by MIXL and MTUCX;
MIXL has no --enable_vmm option. Build the optional two-OS probe with
-Dbuild_fabric_probe=true. The probe requires MTUCX to be configured with
MUSA Fabric VMM APIs and requires two independent OSes in a common Fabric domain.
The single-process example below does not validate cross-OS Fabric.
The default installation prefix is /usr/local/mixl. For an unprivileged source
build, use a prefix under the build tree. The install also copies LICENSE,
License.txt, and NOTICE to <prefix>/share/doc/nixl/:
ninja -C build installSelect another prefix at configure time with --prefix.
After installation, make the libraries available in the current shell:
export MIXL_PREFIX="$PWD/install"
export LD_LIBRARY_PATH="$MIXL_PREFIX/lib/x86_64-linux-gnu:$MUCX_PREFIX/lib:$MUCX_PREFIX/lib/ucx:/usr/local/musa/lib:${LD_LIBRARY_PATH}"
export NIXL_PLUGIN_DIR="$MIXL_PREFIX/lib/x86_64-linux-gnu/plugins"Use lib instead of lib/x86_64-linux-gnu when Meson installs libraries there.
Run the installed single-process example to check UCX plugin loading and host-memory transfers between two local agents:
"$MIXL_PREFIX/bin/nixl_example" UCXWith the Python bindings installed from this source tree, check that the UCX backend was created:
python3 -c "import nixl; config = nixl.nixl_agent_config(backends=['UCX']); agent = nixl.nixl_agent('agent1', config); assert 'UCX' in agent.backends, 'UCX backend unavailable'"To verify GPU transfers across OS instances, follow the MUSA Fabric integration test.
examples/cpp/: installed C++ examples, includingnixl_exampleexamples/python/: Python examples, includingbasic_two_peers.pyandexpanded_two_peers.pybenchmark/nixlbench/: performance benchmark; seebenchmark/nixlbench/README.md
nixlbench detects MUSA after CUDA and ROCm. On a machine with both CUDA and MUSA, configure it with -Duse_musa=true.
Source builds can also target the upstream CUDA and ROCm paths. Those options, ETCD, documentation, Rust bindings, and container builds are documented below and are unchanged from upstream NIXL.
Common Meson options:
build_docs: Build Doxygen documentation (default: false)ucx_path: Path to the UCX installation (default: system path)install_headers: Install development headers (default: true)disable_gds_backend: Disable the GDS backend (default: false)cudapath_inc,cudapath_lib: Custom CUDA pathsmusapath_inc,musapath_lib: Custom MUSA pathsuse_musa: Prefer MUSA over CUDA in tests and benchmarks when both toolchains are installed (default: false)build_fabric_probe: Build the opt-in two-OS MUSA Fabric agent probe (default: false; requiresuse_musa=trueand a MUSA-enabled MTUCX)static_plugins: Comma-separated list of plug-ins to build staticallyenable_plugins: Comma-separated list of plug-ins to build, for example-Denable_plugins=UCX,POSIX. Cannot be used withdisable_plugins.disable_plugins: Comma-separated list of plug-ins to exclude, for example-Ddisable_plugins=GDS. Cannot be used withenable_plugins.wheel_variant: Override the Python wheel variant suffix. Empty means autodetection from the CUDA major version.
Plug-ins with extra requirements:
Use GitHub Issues for bug reports, installation problems, performance issues, and feature requests. Do not disclose vulnerability details or sensitive information in a public issue.
MIXL is licensed under the Apache License 2.0. Read License.txt, LICENSE, and NOTICE. The code under examples/device/ep is derived from DeepEP and remains under the MIT License in examples/device/ep/LICENSE-DeepEP.
Third-party components and their license terms are listed in:
ATTRIBUTIONS-CPP.mdATTRIBUTIONS-Python.mdATTRIBUTIONS-Rust.mdlicenses/NVIDIA-proprietary-LICENSE.txt
MIXL does not redistribute the MUSA driver, MUSA Toolkit, UCX, or other third-party binary dependencies. Python wheels built from the upstream NIXL scripts can bundle NVIDIA modules under the NVIDIA Proprietary License.
The sections below retain the upstream CUDA, ROCm, Python, and ETCD instructions.
-
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/)
Upstream NIXL is tested on Ubuntu (22.04/24.04) and Fedora. For the MIXL MUSA test environment, see Platforms.
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 nixlThis installs both CUDA 12 and CUDA 13 backends. At runtime, the correct backend is selected automatically based on the CUDA version reported by PyTorch.
NIXL requires a C++20 compatible compiler (GCC >= 11 or Clang >= 14).
$ sudo apt install build-essential cmake pkg-config
$ sudo dnf install gcc-c++ cmake pkg-config
$ pip3 install meson ninja pybind11 tomlkit
The following inherited NIXL instructions are for the upstream CUDA path only. They do not provide MUSA support. For this branch, use the matching MTUCX build and the MUSA configuration shown above. NIXL's upstream CUDA path was tested with UCX version 1.23.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.23.x
$ ./autogen.sh
$ ./contrib/configure-release-mt \
--enable-shared \
--disable-static \
--disable-doxygen-doc \
--enable-optimizations \
--without-avx \
--enable-cma \
--enable-devel-headers \
--with-cuda=<cuda install> \
--with-verbs \
--with-dm \
--with-gdrcopy=<gdrcopy install>
$ make -j
$ make -j install-strip
$ ldconfig
NIXL can use ETCD for metadata distribution and coordination between nodes in distributed environments. To use ETCD with NIXL:
$ sudo apt install etcd etcd-server etcd-client
# Or use Docker
$ docker run -d -p 2379:2379 quay.io/coreos/etcd:v3.5.1
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
Some plugins may have additional build requirements, see them here:
$ meson setup <name_of_build_dir>
$ cd <name_of_build_dir>
$ ninja
$ ninja install
$ meson setup <name_of_build_dir>$ meson setup <name_of_build_dir> --buildtype=debug# 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 backendMUSA options and the public build prefix are documented at the top of this file.
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/rocmPlugins 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):
LIBFABRICplugin disabled on ROCm pending header refactor.- No NVSHMEM-equivalent backend yet (rocSHMEM analog is a candidate for a future plugin).
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
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/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 nixlThis 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:
uv: https://docs.astral.sh/uv/getting-started/installation/tomlkit: https://pypi.org/project/tomlkit/PyTorch: https://pytorch.org/get-started/locally/
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:
- Build NIXL binaries and install them
- Build and install the CUDA platform-specific package (
nixl-cu12ornixl-cu13) - Build and install the
nixlmeta-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/.
- Use
-Drust=truemeson option to build rust bindings. - Use
--buildtype=debugfor a debug build (default is release). - Or build manually:
$ cargo build --release
The bindings will be installed under nixl-sys in the configured installation prefix.
Can be done using ninja, from project build directory:
$ ninja install# Rust bindings tests
$ cargo test
Use in your project by adding to Cargo.toml:
[dependencies]
nixl-sys = { path = "path/to/nixl/bindings/rust" }See contrib/README.md for more build options.
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.
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
NIXL can use ETCD for metadata exchange between distributed nodes. This is especially useful in containerized or cloud-native environments.
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"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_exampleFor 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