Unverified Commit 157b4e2d authored by Yuting Jiang's avatar Yuting Jiang Committed by GitHub
Browse files

Benchmarks: Add Benchmark - Revise and add rccl microbenchmark for rocm (#143)

**Description**
Add rccl bandwidth microbenchmark for rocm.

**Major Revision**
- Register rccl-bw benchmark.
parent a532eee4
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
"""Micro benchmark example for NCCL Bus bandwidth performance. """Micro benchmark example for NCCL/RCCL Bus bandwidth performance.
Commands to run: Commands to run:
python3 examples/benchmarks/nccl_bw_performance.py python3 examples/benchmarks/nccl_bw_performance.py
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
context = BenchmarkRegistry.create_benchmark_context( context = BenchmarkRegistry.create_benchmark_context(
'nccl-bw', platform=Platform.CUDA, parameters='--operations allreduce' 'nccl-bw', platform=Platform.CUDA, parameters='--operations allreduce'
) )
# For ROCM environment, please specify the benchmark name and the platform as the following.
# context = BenchmarkRegistry.create_benchmark_context(
# 'rccl-bw', platform=Platform.ROCM, parameters='--operations allreduce --maxbytes 128M'
# )
benchmark = BenchmarkRegistry.launch_benchmark(context) benchmark = BenchmarkRegistry.launch_benchmark(context)
if benchmark: if benchmark:
logger.info( logger.info(
......
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
"""Module of the NCCL performance benchmarks.""" """Module of the NCCL/RCCL performance benchmarks.
We assume NCCL-tests and RCCL-tests have the same interface and output in the test scope so far.
So the arguments and result parsing are the same.
"""
import os import os
import re import re
...@@ -213,3 +217,4 @@ def _process_raw_result(self, cmd_idx, raw_output): # noqa: C901 ...@@ -213,3 +217,4 @@ def _process_raw_result(self, cmd_idx, raw_output): # noqa: C901
BenchmarkRegistry.register_benchmark('nccl-bw', CudaNcclBwBenchmark, platform=Platform.CUDA) BenchmarkRegistry.register_benchmark('nccl-bw', CudaNcclBwBenchmark, platform=Platform.CUDA)
BenchmarkRegistry.register_benchmark('rccl-bw', CudaNcclBwBenchmark, platform=Platform.ROCM)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment