-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Benchmarks: micro benchmarks - add nvbandwidth benchmark (#669)
**Description** Add nvbandwidth benchmark. --------- Co-authored-by: hongtaozhang <[email protected]>
- Loading branch information
Showing
6 changed files
with
550 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT license. | ||
|
||
"""Micro benchmark example for nvbandwidth benchmark. | ||
Commands to run: | ||
python3 examples/benchmarks/nvbandwidth.py | ||
""" | ||
|
||
from superbench.benchmarks import BenchmarkRegistry, Platform | ||
from superbench.common.utils import logger | ||
|
||
if __name__ == '__main__': | ||
context = BenchmarkRegistry.create_benchmark_context( | ||
'nvbandwidth', | ||
platform=Platform.CPU, | ||
parameters=( | ||
'--buffer_size 128 ' | ||
'--test_cases 0,1,19,20 ' | ||
'--skip_verification ' | ||
'--disable_affinity ' | ||
'--use_mean ' | ||
'--num_loops 10' | ||
) | ||
) | ||
|
||
benchmark = BenchmarkRegistry.launch_benchmark(context) | ||
if benchmark: | ||
logger.info( | ||
'benchmark: {}, return code: {}, result: {}'.format( | ||
benchmark.name, benchmark.return_code, benchmark.result | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.