Files
rocm-systems/README.md
T

77 خطوط
2.5 KiB
Markdown

2015-11-17 11:30:40 -08:00
# NCCL
2021-02-09 15:34:08 -08:00
Optimized primitives for inter-GPU communication.
2015-11-17 11:30:40 -08:00
## Introduction
2021-02-09 15:34:08 -08:00
NCCL (pronounced "Nickel") 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, NVLink, NVswitch, as well as networking using InfiniBand Verbs or TCP/IP sockets. NCCL 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.
2018-09-24 16:06:59 -07:00
For more information on NCCL usage, please refer to the [NCCL documentation](https://docs.nvidia.com/deeplearning/sdk/nccl-developer-guide/index.html).
2015-11-17 11:30:40 -08:00
2018-09-24 16:06:59 -07:00
## Build
2015-11-17 11:30:40 -08:00
2018-11-08 11:22:28 -08:00
Note: the official and tested builds of NCCL can be downloaded from: https://developer.nvidia.com/nccl. You can skip the following build steps if you choose to use the official builds.
2018-09-24 16:06:59 -07:00
To build the library :
2015-11-17 11:30:40 -08:00
```shell
$ cd nccl
2018-09-24 16:06:59 -07:00
$ make -j src.build
2015-11-17 11:30:40 -08:00
```
2018-09-24 16:06:59 -07:00
If CUDA is not installed in the default /usr/local/cuda path, you can define the CUDA path with :
2015-11-17 11:30:40 -08:00
```shell
2018-09-24 16:06:59 -07:00
$ make src.build CUDA_HOME=<path to cuda install>
2015-11-17 11:30:40 -08:00
```
2018-09-24 16:06:59 -07:00
NCCL will be compiled and installed in `build/` unless `BUILDDIR` is set.
2015-11-17 11:30:40 -08:00
2018-09-24 16:06:59 -07:00
By default, NCCL is compiled for all supported architectures. To accelerate the compilation and reduce the binary size, consider redefining `NVCC_GENCODE` (defined in `makefiles/common.mk`) to only include the architecture of the target platform :
```shell
$ make -j src.build NVCC_GENCODE="-gencode=arch=compute_70,code=sm_70"
```
2015-11-17 11:30:40 -08:00
2018-09-24 16:06:59 -07:00
## Install
2015-11-17 11:30:40 -08:00
2018-09-24 16:06:59 -07:00
To install NCCL on the system, create a package then install it as root.
2015-11-17 11:30:40 -08:00
2018-09-24 16:06:59 -07:00
Debian/Ubuntu :
```shell
$ # Install tools to create debian packages
2019-05-22 21:19:36 -07:00
$ sudo apt install build-essential devscripts debhelper fakeroot
$ # Build NCCL deb package
2018-09-24 16:06:59 -07:00
$ make pkg.debian.build
$ ls build/pkg/deb/
```
2018-09-24 16:06:59 -07:00
RedHat/CentOS :
```shell
$ # Install tools to create rpm packages
$ sudo yum install rpm-build rpmdevtools
$ # Build NCCL rpm package
2018-09-24 16:06:59 -07:00
$ make pkg.redhat.build
$ ls build/pkg/rpm/
```
2018-09-24 16:06:59 -07:00
OS-agnostic tarball :
```shell
$ make pkg.txz.build
$ ls build/pkg/txz/
```
2018-09-24 16:06:59 -07:00
## Tests
2018-09-24 16:06:59 -07:00
Tests for NCCL are maintained separately at https://github.com/nvidia/nccl-tests.
2018-09-24 16:06:59 -07:00
```shell
$ git clone https://github.com/NVIDIA/nccl-tests.git
$ cd nccl-tests
$ make
2018-10-12 19:08:14 +02:00
$ ./build/all_reduce_perf -b 8 -e 256M -f 2 -g <ngpus>
2015-11-17 11:30:40 -08:00
```
2018-09-24 16:06:59 -07:00
## Copyright
2021-02-09 15:34:08 -08:00
All source code and accompanying documentation is copyright (c) 2015-2020, NVIDIA CORPORATION. All rights reserved.