파일
rocm-systems/README.md
T

75 라인
3.5 KiB
Markdown
Raw 일반 보기 히스토리

2019-04-09 15:51:40 -07:00
# RCCL Tests
2017-08-08 16:18:34 -07:00
2019-05-15 11:22:34 -06:00
These tests check both the performance and the correctness of RCCL operations. They can be compiled against [RCCL](https://github.com/ROCmSoftwarePlatform/rccl).
2017-08-08 16:18:34 -07:00
## Build
To build the tests, just type `make`.
2019-05-15 16:59:47 +00:00
If HIP is not installed in /opt/rocm, you may specify HIP\_HOME. Similarly, if RCCL is not installed in /usr, you may specify NCCL\_HOME and CUSTOM\_RCCL\_LIB.
2017-08-08 16:18:34 -07:00
```shell
2019-05-15 16:59:47 +00:00
$ make HIP_HOME=/path/to/hip NCCL_HOME=/path/to/rccl CUSTOM_RCCL_LIB=/path/to/rccl/lib/librccl.so
2017-08-08 16:18:34 -07:00
```
2019-04-09 15:51:40 -07:00
RCCL tests rely on MPI to work on multiple processes, hence multiple nodes. If you want to compile the tests with MPI support, you need to set MPI=1 and set MPI\_HOME to the path where MPI is installed.
2017-08-08 16:18:34 -07:00
```shell
2019-04-09 15:51:40 -07:00
$ make MPI=1 MPI_HOME=/path/to/mpi HIP_HOME=/path/to/hip RCCL_HOME=/path/to/rccl
2017-08-08 16:18:34 -07:00
```
## Usage
2019-04-09 15:51:40 -07:00
RCCL tests can run on multiple processes, multiple threads, and multiple HIP devices per thread. The number of process is managed by MPI and is therefore not passed to the tests as argument. The total number of ranks (=HIP devices) will be equal to (number of processes)\*(number of threads)\*(number of GPUs per thread).
2017-08-08 16:18:34 -07:00
### Quick examples
Run on 8 GPUs (`-g 8`), scanning from 8 Bytes to 128MBytes :
```shell
$ ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 8
```
Run with MPI on 40 processes (potentially on multiple nodes) with 4 GPUs each, disabling checks :
```shell
$ mpirun -np 40 ./build/all_reduce_perf -b 8 -e 128M -f 2 -g 4 -c 0
```
2018-01-29 13:40:45 -08:00
### Performance
2018-01-30 09:14:49 -08:00
See the [Performance](doc/PERFORMANCE.md) page for explanation about numbers, and in particular the "busbw" column.
2018-01-29 13:40:45 -08:00
2017-08-08 16:25:07 -07:00
### Arguments
All tests support the same set of arguments :
2017-08-08 16:18:34 -07:00
* Number of GPUs
* `-t,--nthreads <num threads>` number of threads per process. Default : 1.
* `-g,--ngpus <GPUs per thread>` number of gpus per thread. Default : 1.
2017-08-08 16:18:34 -07:00
* Sizes to scan
* `-b,--minbytes <min size in bytes>` minimum size to start with. Default : 32M.
* `-e,--maxbytes <max size in bytes>` maximum size to end at. Default : 32M.
2017-08-08 16:29:25 -07:00
* Increments can be either fixed or a multiplication factor. Only one of those should be used
2017-08-08 16:28:46 -07:00
* `-i,--stepbytes <increment size>` fixed increment between sizes. Default : (max-min)/10.
* `-f,--stepfactor <increment factor>` multiplication factor between sizes. Default : disabled.
2019-04-09 15:51:40 -07:00
* RCCL operations arguments
2017-08-08 16:28:46 -07:00
* `-o,--op <sum/prod/min/max/all>` Specify which reduction operation to perform. Only relevant for reduction operations like Allreduce, Reduce or ReduceScatter. Default : Sum.
* `-d,--datatype <nccltype/all>` Specify which datatype to use. Default : Float.
* `-r,--root <root/all>` Specify which root to use. Only for operations with a root like broadcast or reduce. Default : 0.
* Performance
2017-08-08 16:18:34 -07:00
* `-n,--iters <iteration count>` number of iterations. Default : 20.
* `-w,--warmup_iters <warmup iteration count>` number of warmup iterations (not timed). Default : 5.
* `-m,--agg_iters <aggregation count>` number of operations to aggregate together in each iteration. Default : 1.
2017-08-08 16:28:46 -07:00
* Test operation
2019-04-09 15:51:40 -07:00
* `-p,--parallel_init <0/1>` use threads to initialize RCCL in parallel. Default : 0.
2017-08-08 16:28:46 -07:00
* `-c,--check <0/1>` check correctness of results. This can be quite slow on large numbers of GPUs. Default : 1.
2019-04-09 15:51:40 -07:00
* `-z,--blocking <0/1>` Make RCCL collective blocking, i.e. have CPUs wait and sync after each collective. Default : 0.
2017-08-08 16:18:34 -07:00
## Copyright
2019-04-10 15:28:40 -07:00
RCCL tests are provided under the BSD license.
2019-05-15 11:22:34 -06:00
2019-04-10 15:28:40 -07:00
All source code and accompanying documentation is copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
2019-05-15 11:22:34 -06:00
2019-04-10 15:28:40 -07:00
All modifications are copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
2017-08-08 16:18:34 -07:00