Explainer
NCCL vs NIXL: which bytes each one moves in LLM inference
NCCL vs NIXL in LLM inference: NCCL collectives for tensor and expert parallelism, NIXL transfers for KV cache state, which vLLM and SGLang backends use each, and how each library is growing into the other's job.
- LLM inference
- NCCL
- NIXL
- GPU networking
- KV cache
- Disaggregated serving
People ask whether an inference stack should use NCCL or NIXL, as if one could replace the other. In a serving engine today, both run at once. They move different bytes for different reasons.
Inference moves bytes between GPUs for two jobs. The first is parallel compute. A model too large or too slow for one GPU is split across several, and each forward pass combines the pieces' results. The second is state movement. A request's KV cache leaves the GPU that computed it, for another GPU, host memory, a disk or a network store.
NCCL was built for the first job, and NIXL for the second. Over the last year, each library has added features that reach into the other's job. So the useful question is which job a given byte is doing, and which library each engine uses for it.
Two jobs with different shapes
On a network graph the two jobs look alike: bytes leave one GPU's memory and arrive in another's. They differ in almost everything else.
| Parallel compute | State movement | |
|---|---|---|
| Examples | Tensor-parallel all-reduce, expert-parallel dispatch and combine | Prefill-to-decode KV handoff, offload to host memory or disk, a shared KV store |
| Who takes part | A fixed group of GPUs, all at the same step | Any two parties, each when it is ready |
| How often | Every layer of every forward pass | About once per request, or once per eviction |
| Memory involved | GPU memory | GPU memory, host memory, files, block devices, object stores |
| On the critical path | Always: the next layer waits for it | Often hidden: overlapped with compute, or before the first token |
| When a peer fails | The whole group stops | One transfer fails, and the request can recompute |
The last row matters most in production. A collective needs every member to arrive. A transfer involves two parties, and either one can fail without stopping anyone else.
What NCCL is for
NCCL, the NVIDIA Collective Communications Library, implements collectives over NVLink, PCIe, InfiniBand and RoCE: all-reduce, all-gather, reduce-scatter, all-to-all and broadcast. It has also had point-to-point send and receive for years. A communicator names a fixed group of ranks, and every rank calls the same operation in the same order.
Inference calls it on the hot path. Under Megatron-style tensor parallelism, each transformer layer ends its attention block and its MLP block with an all-reduce. A 61-layer model therefore runs 122 all-reduces per forward pass, while its KV cache crosses to a decode GPU once per request. Under expert parallelism, each mixture-of-experts layer sends every token to the GPUs that hold its experts and brings the results back. Those two steps, dispatch and combine, are both all-to-all patterns.
Hover a part to see its nameNCCL is not the only library on that path. For small all-reduces inside one NVLink domain, vLLM tries its own kernels first: quick-reduce, a custom all-reduce, symmetric memory and FlashInfer. It falls back to NCCL through PyNcclCommunicator. SGLang has a custom all-reduce and MSCCL++ beside NCCL in the same way.
What NIXL is for
NIXL, the NVIDIA Inference Xfer Library, is part of the NVIDIA Dynamo project and moves data between agents. An agent registers memory and describes it as lists of buffers. It exchanges that description with a peer, then posts a read or a write between the two lists. No third party has to take part.
Its memory types show what it was built for: GPU memory, host memory, block devices, objects and files. One API sits over many backends, chosen per transfer. At NIXL 1.5.2, the plugins cover UCX and Libfabric for RDMA and EFA, UCCL, GPUDirect Storage, POSIX files, 3FS, DAOS, Redis, S3-style object stores, Azure Blob, Mooncake and GPUDirect-TCPXO, among others. NIXL 1.0, released in March 2026, marked its API as stable.
Hover a part to see its nameWhich engine uses which, today
| Job | vLLM | SGLang |
|---|---|---|
| Tensor-parallel all-reduce | Custom kernels for small messages, NCCL otherwise | Custom all-reduce, MSCCL++ or NCCL |
| Expert-parallel all-to-all | Default depends on the GPU: allgather and reduce-scatter on Hopper, FlashInfer on Blackwell systems. DeepEP, MoRI, MoonEP or NIXL-EP by choice | DeepEP, Mooncake, NIXL, MoRI, FlashInfer or MegaMoE by choice |
| Prefill-to-decode KV handoff | NIXL, Mooncake or MoRI-IO connectors | Mooncake, NIXL, MoRI or Ascend |
| Offload to lower tiers | Native connectors, LMCache, Mooncake Store | HiCache, with NIXL as one storage backend |
Both engines keep NCCL under tensor parallelism, and both now accept NIXL as one choice for expert-parallel all-to-all. For KV handoff, NIXL is one of three or four backends in each engine, beside Mooncake. TensorRT-LLM goes further: its disaggregated-serving guide names NIXL as the backend to set, and its C++ cache transceiver is deprecated as of version 1.4.
NCCL is moving toward state
NCCL's release notes for the last eighteen months show a pattern. Each release adds a way to move data that is not a classic collective.
| Release | What it added |
|---|---|
| 2.27.3 | Symmetric memory windows ( |
| 2.28.3, October 2025 | An experimental device API: communication called from inside an application kernel |
| 2.28.7, October 2025 | GPU-initiated networking (GIN): a kernel posts network operations without the CPU |
| 2.29.2, December 2025 | One-sided host APIs, and ncclCommGrow to add ranks back after a failure |
| 2.30.3, April 2026 | Elastic buffers, and GIN timeouts and resource sharing |
| NCCL EP 0.1.0, June 2026 | A separate extension for mixture-of-experts dispatch and combine |
| 2.30.7, June 2026 | All-gather and all-to-all that use copy engines instead of GPU cores |
| 2.31.2, August 2026 | Device-side put, get and reduce on registered windows; an EFA backend for GIN |
| 2.32.3, September 2026 | GIN over TCP sockets |
One-sided put and get is how state moves: one party writes into another's memory, and the other does not take part. Growing and shrinking a communicator lets a group survive a lost member. Those are the two properties the parallel-compute column of the first table lacked.
NIXL is moving toward compute
NIXL moved the other way. Version 0.6 previewed a device API, so that a GPU kernel can post transfers itself. Version 0.10 introduced its second version, and version 1.0 finalized it. Version 1.5 opened it to Python and Rust. Version 1.1, in May 2026, added a high-throughput dispatch and combine path for its expert-parallel example, NIXL-EP. vLLM now offers nixl_ep among more than a dozen expert-parallel all-to-all backends, and SGLang accepts nixl there too.
So both libraries now offer mixture-of-experts dispatch, and expert parallelism is where the two jobs meet. Dispatch looks like a collective, because every GPU sends to every other GPU in the same layer. It also looks like state movement, because each GPU sends a different, data-dependent amount to each peer, which suits a one-sided write into the peer's buffer.
Neither library invented this. DeepEP, built on NVSHMEM and InfiniBand GPUDirect Async, showed GPU-initiated dispatch first. NCCL's GIN and NIXL's device API are both catching up to that design.
The network card is shared
On many GPU servers, NCCL's collectives and NIXL's KV transfers leave through the same network cards. Neither library schedules around the other's traffic. A large KV handoff can therefore share a link with a decode step's all-to-all.
NCCL lets you put its traffic in its own InfiniBand traffic class with NCCL_IB_TC, and since 2.30.7 its GIN traffic with NCCL_GIN_IB_TC. With a matching switch policy, collective traffic and bulk KV transfers can sit in separate queues. Whether that matters on your cluster is a measurement: run the decode step with and without KV transfers on the same cards.
Where to draw the line
Start from what the byte is for.
- Every rank must arrive at the same step: tensor-parallel reductions and gathers. Use NCCL, or the engine's custom kernels for small messages inside one NVLink domain.
- Two parties exchange state when each is ready, across memory kinds: KV handoff, offload, a shared store. Use NIXL or Mooncake. Both handle host memory, and a failed transfer does not stop a group.
- Expert-parallel dispatch and combine: measure. The choice now spans NCCL EP, NIXL-EP, DeepEP, FlashInfer and vendor libraries. The winner depends on message size, GPU cores used, NVLink domain size and the network.
- Anything that shares a network card with a collective: give it its own traffic class, or measure what it costs the decode step.
How to check which path you got
A library that cannot use the fast path often takes a slow one without an error. Check before you trust a number.
Hover a part to see its name- Run with
NCCL_DEBUG=INFOand read which transport each NCCL channel chose. - Measure NIXL's pairwise rate with
nixlbenchfrom the NIXL repository, and compare it with the bandwidth your engine achieves for KV transfers. NIXL exports transfer-time histograms to Prometheus since version 1.5. - Read the network cards' RDMA byte counters during a run. KV bytes that should cross RDMA and do not are a fallback.
- For storage tiers, run
gdscheck -pand confirm that GPUDirect Storage is not in compatibility mode.
Questions engineers ask
What is NIXL?
NIXL is NVIDIA's inference transfer library. It moves buffers between agents across GPU memory, host memory, files, block devices and object stores, over backends such as UCX, Libfabric and GPUDirect Storage. Disaggregated serving uses it to move the KV cache from prefill to decode.
Can NCCL replace NIXL for KV transfer?
It is getting closer: one-sided put and get and device-initiated networking were the parts it lacked. It still works between ranks of one group, in GPU memory. KV offload also needs host memory, files and object stores, and peers that come and go.
Can NIXL replace NCCL for tensor parallelism?
Not today. A tensor-parallel all-reduce on every layer needs collective algorithms tuned per topology, such as rings, trees and NVLink SHARP. NIXL moves buffers between two agents. It does not implement reductions.
What is the difference between NIXL and UCX?
UCX is one of NIXL's backends. NIXL adds the agent model, memory registration across memory kinds, and other backends behind the same API, so an engine can move KV to a GPU, a file or an object store with one call.
Is NIXL only for NVIDIA GPUs?
No. NIXL 1.3 added AMD ROCm support for MI300X, MI325X, MI350X and MI355X, and its Libfabric backend serves AWS EFA.
References
- NCCL, release notes for 2.27.3 (opens in a new tab), for symmetric memory and
ncclCommShrink. - NCCL, GitHub releases (opens in a new tab), for 2.28.3 through 2.32.7 and NCCL EP 0.1.0.
- NIXL, GitHub releases (opens in a new tab), for 0.6.0 through 1.5.2, and the plugins (opens in a new tab) and memory types (opens in a new tab) at commit 89c26f2.
- vLLM, the all-reduce dispatch (opens in a new tab),
PyNcclCommunicator(opens in a new tab), the all-to-all backends (opens in a new tab) and the default rule (opens in a new tab), commit 361f362. - SGLang, disaggregation transfer backends (opens in a new tab), all-to-all backends (opens in a new tab) and device communicators (opens in a new tab), commit 4791be0.
- TensorRT-LLM, disaggregated serving (opens in a new tab), commit 855841e, for the NIXL backend and the transceiver deprecation.
- DeepSeek, DeepEP (opens in a new tab), for GPU-initiated expert-parallel dispatch over NVSHMEM.
- Shoeybi et al., Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism (opens in a new tab), for the two all-reduces per transformer layer.