cpu_stream_performance.py 742 Bytes
Newer Older
rafsalas19's avatar
rafsalas19 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

"""Micro benchmark example for CPU Stream performance.

Commands to run:
  python3 examples/benchmarks/cpu_stream_performance.py
"""

from superbench.benchmarks import BenchmarkRegistry
from superbench.common.utils import logger

if __name__ == '__main__':
    context = BenchmarkRegistry.create_benchmark_context(
15
        'cpu-stream', parameters='--cpu_arch neo2 --numa_mem_nodes 0 --cores 0 1 2 3'
rafsalas19's avatar
rafsalas19 committed
16
17
18
19
20
21
22
23
24
    )

    benchmark = BenchmarkRegistry.launch_benchmark(context)
    if benchmark:
        logger.info(
            'benchmark: {}, return code: {}, result: {}'.format(
                benchmark.name, benchmark.return_code, benchmark.result
            )
        )