benchmark_def module

class benchmark_def.Benchmark(filepath, defmodel, framework, prog=None, desc=None, parser=None)[source]

Bases: object

Class that implements an interface to handle configuration options for the different CANDLE benchmarks. It provides access to all the common configuration options and configuration options particular to each individual benchmark. It describes what minimum requirements should be specified to instantiate the corresponding benchmark. It interacts with the argparser to extract command-line options and arguments from the benchmark’s configuration files.

check_required_exists(gparam)[source]

Functionality to verify that the required model parameters have been specified.

format_benchmark_config_arguments(dictfileparam)[source]

Functionality to format the particular parameters of the benchmark.

Parameters
  • dictfileparam (python dictionary) – parameters read from configuration file

  • args (python dictionary) – parameters read from command-line Most of the time command-line overwrites configuration file except when the command-line is using default values and config file defines those values

parse_parameters()[source]

Functionality to parse options common for all benchmarks. This functionality is based on methods ‘get_default_neon_parser’ and ‘get_common_parser’ which are defined previously(above). If the order changes or they are moved, the calling has to be updated.

read_config_file(file)[source]

Functionality to read the configue file specific for each benchmark.

set_locals()[source]

Functionality to set variables specific for the benchmark - required: set of required parameters for the benchmark. - additional_definitions: list of dictionaries describing the additional parameters for the benchmark.

benchmark_def.set_seed(seed)[source]

Set the seed of the pseudo-random generator to the specified value.

Parameters

seed (int) – Value to intialize or re-seed the generator.