Files
rocm-systems/README.md
T

93 строки
3.1 KiB
Markdown
Исходник Обычный вид История

2015-11-17 11:30:40 -08:00
# NCCL
Optimized primitives for collective multi-GPU communication.
## Introduction
2018-09-24 16:06:59 -07:00
NCCL (pronounced "Nickel") is a stand-alone library of standard collective communication routines for GPUs, implementing all-reduce, all-gather, reduce, broadcast, and reduce-scatter. 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.
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
## What's inside
2018-09-24 16:06:59 -07:00
At present, the library implements the following collectives operations:
2015-11-17 11:30:40 -08:00
- all-reduce
- all-gather
- reduce-scatter
- reduce
- broadcast
2018-09-24 16:06:59 -07:00
These operations are implemented using ring algorithms and have been optimized for throughput and latency. For best performance, small operations can be either batched into larger operations or aggregated through the API.
2015-11-17 11:30:40 -08:00
## Requirements
2018-09-24 16:06:59 -07:00
NCCL requires at least CUDA 7.0 and Kepler or newer GPUs. For PCIe based platforms, best performance is achieved when all GPUs are located on a common PCIe root complex, but multi-socket configurations are also supported.
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
2019-03-14 19:39:20 -07:00
All source code and accompanying documentation is copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved.