|
Benchtools provide a set of scripts for compiling and running
benchmarks that are in a specific benchmark-package format
(described below). The scripts require the
following environment variables:
BENCHTOOLS_ROOT | this is the path to the benchtools directory |
HOST_COMPILER | this is the compiler to be used to compile the benchmark source |
HOST_PLATFORM | this is the type of the computing substrate where the benchmark will be compiled and run |
USER_BENCH_PATHX | this is the path to the benchmark directory tree (X = 1, 2 , 3, or 4) |
In addition, the $BENCHTOOLS_ROOT/scripts directory should be included
in the shell path. The scripts provided are:
find_bench_dir | returns the path to the specified benchmark |
copy_bench_src | copies the source files from the specified benchmark to the local directory |
remove_bench_src | removes the source files of the specified benchmarks from the local directory |
read_compile_info | returns the compilation flags necessary to build the specified benchmark |
compile_bench | builds the specified benchmark (using the $HOST_COMPILER and flags returned by read_compile_info) |
read_exec_info | returns the set of commands and arguments necessary to run a benchmark for a specified input workload (use find_bench_inputs to retrieve the set of workloads for a benchmark) |
run_bench | runs the specified benchmarks using all of its input workloads |
The benchmark-package format requires that every
benchmark has its own directory (e.g., $USER_BENCH_PATH1/foobar).
The package (directory) contains:
compile_info | a file that defines various flags necessary to compile a benchmark (e.g., pre-processing options, library requirements, training and evaluation input workloads) |
compile_parms | a file to override compile time parameters (not supported in this version of benchtools) |
src/ | a flat (no subdirectories) directory that includes all source files, including header files |
exec_info_input_xxx | a file that contains information for running the benchmark for input workload xxx (if a benchmark requires input files, or to store sample outputs, appropriate directories can be created within the benchmark package). |
Many of the scripts, and the benchmark-package format, are
adopted from the Trimaran compilation infrastructure. Please
review the license agreement for more details.
|