From f67ec845f54e08a84c16669c1f2381c7fe1c5b96 Mon Sep 17 00:00:00 2001 From: hongtaozhang Date: Tue, 12 Nov 2024 11:13:25 -0800 Subject: [PATCH] Add default arguments in benchmark. --- .../cpu_memory_bw_latency_performance.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/superbench/benchmarks/micro_benchmarks/cpu_memory_bw_latency_performance.py b/superbench/benchmarks/micro_benchmarks/cpu_memory_bw_latency_performance.py index 97eaee8a7..86f363131 100644 --- a/superbench/benchmarks/micro_benchmarks/cpu_memory_bw_latency_performance.py +++ b/superbench/benchmarks/micro_benchmarks/cpu_memory_bw_latency_performance.py @@ -29,6 +29,7 @@ def add_parser_arguments(self): """Add the specified arguments.""" super().add_parser_arguments() + # Add arguments for the Intel MLC tool. self._parser.add_argument( '--tests', type=str, @@ -38,6 +39,37 @@ def add_parser_arguments(self): help='The modes to run mlc with. Possible values are {}.'.format(' '.join(self.__support_mlc_commands)) ) + # Add arguments for the general CPU copy benchmark. + self._parser.add_argument( + '--size', + type=int, + default=256 * 1024**2, + required=False, + help='Size of data buffer in bytes for non mlc benchmark. Default is 256MB.', + ) + + self._parser.add_argument( + '--num_warm_up', + type=int, + default=20, + required=False, + help='Number of warm up rounds for non mlc benchmark. Default is 20.', + ) + + self._parser.add_argument( + '--num_loops', + type=int, + default=100, + required=False, + help='Number of data buffer copies performed for non mlc benchmark. Default is 100.', + ) + + self._parser.add_argument( + '--check_data', + action='store_true', + help='Enable data checking for non mlc benchmark. Default is False.', + ) + def _preprocess_mlc(self): """ Preprocess/preparation operations for the Intel MLC tool.""" mlc_path = os.path.join(self._args.bin_dir, self._bin_name)