Skip to content

Commit

Permalink
Add default arguments in benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
hongtaozhang committed Nov 12, 2024
1 parent f748b27 commit f67ec84
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit f67ec84

Please sign in to comment.