Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 2.51 KB

README.md

File metadata and controls

23 lines (16 loc) · 2.51 KB

Running Trimmer on all applications with runbench script

Environment:

All applications were tested on Linux 16.04 with Python 3.5.2. The dependencies required for the examples are installed in the bootstrap.sh script.

Steps:

  1. Build Trimmer on your machine along with the dependencies of the benchmark examples. See build instructuions for more details.
  2. Run ./profiler.sh to compile the profiler pass. This pass is used to generate statistics about the binaries (e.g. number of functions, instructions, memory instructions etc).
  3. Run bash reset.sh. reset.sh deletes old executables and bitcode of applications to allow runbench script to be used afresh
  4. Run ./runbench.py --sets="TSE-2020.set" --trimmer-opts="". Trimmer will specialize the examples provided in the TSE-2020 benchmarks set using default options.

The runbench.py script will run Trimmer on all applications that are enabled in the provided set and print the statistics (e.g. reductions in file size, instructions, functions, and memory instructions) in a table. To enable or disable (skip) examples in the TSE-2020 set, modify TSE-2020.set to toggle the enabled option (i.e. true or false). Note that the runbench script simply calls make followed by build.sh in the folder of the application pointed to by the provided set.

Trimmer Options:

Trimmer can be run with different options such as loop-unroll, string-specialize and file-specialize. User can provide these options through --trimmer-opts. e.g if anyone is only interested in running Trimmer with loop-unroll pass, run this command ./runbench.py --sets="TSE-2020.set" --trimmer-opts="loop-unroll". Options available with trimmer can be found here.

Manifest Files:

The manifest files for every each benchmark in the TSE-2020 examples are automatically generated by the build.sh script. Every build.sh script calls a make command in the Makefile to generate the manifest files and run trimmer.

Logging:

Logs generated by the runbench script are saved in the "Logs" folder in the running directory. To change the default directory for the log files, use the --temp-dirs=<dir> flag. To disable logging, use the --remove-temps flag. By default, debug messages of Trimmer are not printed. To activate this ouput, use: export TRIMMER_DEBUG=Yes. The messages will be printed in a log.txt file in the working directories of the examples.