Optimized primitives for inter-GPU communication.
MCCL (pronounced "Miko") is a stand-alone library of standard communication routines for GPUs, implementing all-reduce, all-gather, reduce, broadcast, reduce-scatter, as well as any send/receive based communication pattern. It has been optimized to achieve high bandwidth on platforms using PCIe, MTLink, NVswitch, as well as networking using InfiniBand Verbs or TCP/IP sockets. MCCL supports an arbitrary number of GPUs installed in a single node or across multiple nodes, and can be used in either single- or multi-process (e.g., MPI) applications.
For more information on MCCL usage, please refer to the MCCL documentation.
Note: the official and tested builds of MCCL can be downloaded from: https://developer.mthreads.com/mccl. You can skip the following build steps if you choose to use the official builds.
To build the library :
$ cd mccl
$ make -j src.buildIf MUSA is not installed in the default /usr/local/musa path, you can define the MUSA path with :
$ make src.build MUSA_HOME=<path to musa install>MCCL will be compiled and installed in build/ unless BUILDDIR is set.
By default, MCCL is compiled for all supported architectures. To accelerate the compilation and reduce the binary size, consider redefining MCC_GENCODE (defined in makefiles/common.mk) to only include the architecture of the target platform :
$ make -j src.build MCC_GENCODE="--cuda-gpu-arch=mp_31"To install MCCL on the system, create a package then install it as root.
Debian/Ubuntu :
$ # Install tools to create debian packages
$ sudo apt install build-essential devscripts debhelper fakeroot
$ # Build MCCL deb package
$ make pkg.debian.build
$ ls build/pkg/deb/RedHat/CentOS :
$ # Install tools to create rpm packages
$ sudo yum install rpm-build rpmdevtools
$ # Build MCCL rpm package
$ make pkg.redhat.build
$ ls build/pkg/rpm/OS-agnostic tarball :
$ make pkg.txz.build
$ ls build/pkg/txz/Tests for MCCL are maintained separately at https://github.com/MooreThreads/mccl-tests.
$ git clone https://github.com/MooreThreads/mccl-tests.git
$ cd mccl-tests
$ make
$ ./build/all_reduce_perf -b 8 -e 256M -f 2 -g <ngpus>Copyright in Moore Threads modifications: Copyright (c) 2025-2026 Moore Threads Technology Co., Ltd. All rights reserved.
MCCL contains code derived from NVIDIA NCCL and other third-party projects.
Original copyright and license notices remain applicable to the corresponding
files. MCCL is primarily distributed under Apache-2.0, while some files retain
BSD and other third-party licenses. See LICENSE.txt,
ThirdPartyNotices.txt, and the license headers in the source files.
Historical license notices are preserved
verbatim where required and may use former legal entity names.
When redistributing MCCL source or binary artifacts, distribute LICENSE.txt
and ThirdPartyNotices.txt together. Modified source files carry a prominent
Moore Threads modification notice; the original copyright, patent, trademark, attribution,
license, and disclaimer notices must remain in place. The Apache-2.0 license
does not grant LLVM, NVIDIA, DeepSeek, or any other third-party trademark
license or official endorsement.