MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / parse_benchmark_commandline

Function parse_benchmark_commandline

examples/gemm_tuner/GemmTuner.py:468–485  ·  view source on GitHub ↗

Parse the benchmark example command-line string into a dictionary of command-line arguments

(commandline: str)

Source from the content-addressed store, hash-verified

466
467
468def parse_benchmark_commandline(commandline: str) -> Dict[str, str]:
469 """ Parse the benchmark example command-line string into a dictionary of command-line arguments
470 """
471 # Separate the data type option from the example_args portion of the string
472 commandline = commandline.replace(",--type=", " --type=")
473
474 args = commandline.split()
475 # Discard program name
476 args = args[1:]
477 # Split into a list of (argument name, argument value)
478 args = map(lambda arg: arg.split("="), args)
479
480 def transform(_name):
481 # Strip '-'/"--" if it exists
482 _name = _name.lstrip("-")
483 return _name
484
485 return {transform(name): val for name, val in args}
486
487
488def extract_benchmark_results(

Callers 1

Calls 2

mapFunction · 0.85
transformFunction · 0.85

Tested by

no test coverage detected