A unified collective communication library and API that implements operations like allreduce and broadcast across CPUs, GPUs and hardware accelerators for HPC and AI workloads.
NVIDIA/nccl
NCCL is NVIDIA's library of optimized GPU communication primitives such as all-reduce and all-gather for single- and multi-node training.
- Stars
- 5,211
- Forks
- 1,475
- Open issues
- 466
- Last commit
- 3 days ago
What is it?
NCCL (pronounced "Nickel") is a standalone library of collective communication routines for GPUs. It implements all-reduce, all-gather, reduce, broadcast and reduce-scatter, along with any send/receive based communication pattern. It is aimed at workloads where many GPUs must exchange data quickly, such as distributed deep learning.
NCCL is tuned for high bandwidth over PCIe, NVLink and NVSwitch within a node, and over InfiniBand Verbs or TCP/IP sockets between nodes. It supports an arbitrary number of GPUs in one machine or spread across several, and works in both single-process and multi-process (for example MPI) applications.
The repository contains the library source with make targets for building it, plus packaging options for Debian, RPM, a generic tarball and a Python wheel. Tests live in a separate nccl-tests repository.
Key features
- 01Implements all-reduce, all-gather, reduce, broadcast and reduce-scatter collectives
- 02Supports arbitrary GPU counts within a node or across multiple nodes
- 03Uses PCIe, NVLink, NVSwitch, InfiniBand Verbs and TCP/IP sockets
- 04Works in single-process and multi-process (e.g. MPI) applications
- 05Can be built from source or packaged as deb, rpm, tarball or Python wheel
Use cases
- Gradient synchronization in multi-GPU distributed deep learning training
- Exchanging tensors across many GPUs in high-performance computing jobs
- Benchmarking interconnect bandwidth with the companion nccl-tests suite
Quick start
- 1
Download the official NCCL builds from the NVIDIA developer page
- 2
Build the library from source
make -j src.build
Things to know
- The license is not clearly specified in the metadata, so check the repository's license terms before use.
- Building from source requires an installed CUDA toolkit and NVIDIA GPUs.
In collections
Topics
FAQ
- What is nccl?
- NCCL is NVIDIA's library of optimized GPU communication primitives such as all-reduce and all-gather for single- and multi-node training. NCCL (pronounced "Nickel") is a standalone library of collective communication routines for GPUs. It implements all-reduce, all-gather, reduce, broadcast and reduce-scatter, along with any send/receive based communication pattern. It is aimed at workloads where many GPUs must exchange data quickly, such as distributed deep learning.
- Is nccl free to use? What license does it have?
- nccl is open source under the Other license. Check the license terms before using it in commercial products.
- Is nccl still maintained?
- Actively maintained. The last commit to nccl was on Nov 3, 2026.
- What can I use nccl for?
- Gradient synchronization in multi-GPU distributed deep learning training Exchanging tensors across many GPUs in high-performance computing jobs Benchmarking interconnect bandwidth with the companion nccl-tests suite
- How do I install nccl?
- Download the official NCCL builds from the NVIDIA developer page Build the library from source: make -j src.build
- Where can I get nccl?
- The source code and installation instructions are on GitHub: https://github.com/NVIDIA/nccl
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
NVIDIA's PyTorch extension providing utilities for mixed precision and distributed training, with optional fused CUDA and C++ kernels.
A C++20 header-only library for NumPy-style tensor expressions that run on NVIDIA GPUs or multithreaded CPUs, with optional kernel fusion.
Reference architectures, templates and examples for running distributed AI training and inference on AWS clusters.
A self-evolving GPU kernel agent that optimizes CUDA and CuTe DSL kernels by promoting each accepted kernel to the next reference.
An open-source book and code collection of modern CUDA learning notes, with 200+ kernels covering HGEMM, FP8/FP4 GEMM, and Flash-Attention.