git clone
and cd
into the repository and run:
$: mkdir build; cd build
$: cmake ..
$: make -j
$: cd ..
$: ./benchpress --help
To install BenchPress you need to have cmake>=3.14
installed, and a few other standard apt packages. Inspect requirements.apt
file to see what is required. Either apt install
the listed packages or execute the script with sudo rights to install them. This step is optional.
BenchPress uses 3.6<=python.version<=3.8
. python3.8
is recommended. You may also use python3.9
but pip will struggle to find older package versions. You will have to manually bump package versions in requirements.pip
.
Build makefiles:
$: cmake -S <path_to_src_root> -B <path_to_build_root> <-Dcmake_flag1, -Dcmake_flag2, ...>
For most of BenchPress's functionalities (e.g. training and sampling the model), no cmake flags are required. The following build flags are supported:
-DLOCAL=<path>[Default: ""]
: All output binaries and libraries will be compiled under<build_root>/local/
. Override this flag if you want to specify a custom output path (e.g. in the case of high-bandwidth partitions of clusters).-DBOOST_FROM_SOURCE=ON/OF[Default: OFF]
: SetON
if you with boost library to be compiled from source into the build directory. BenchPress does not use boost, however if you want to extend it to C++ synthesis and want boost header files to be visible by the language model, you can use this flag.-DPROTOC_FROM_SOURCE=ON/OFF[Default: OFF]
: BenchPress uses protobuf messages to read/write specifications about the model, corpuses, sampler and other things. To compiler protobufsprotoc
is needed. If you cannot install it globally, this flag will install it from source within the build directory.-DBUILD_CLDRIVE=ON/OFF[Default: OFF]
: SetON
to buildcldrive
, a driver for OpenCL kernels.cldrive
is required if one desires to execute kernels using BenchPress's cli. Details: https://github.com/ChrisCummins/cldrive-DBUILD_CSMITH=ON/OFF[Default: OFF]
: Buildscsmith
fuzzer and adds it to environment.-DBUILD_CLSMITH=ON/OFF[Default: OFF]
: Buildsclsmith
fuzzer (csmith
variation for OpenCL) and adds it to environment.-DBUILD_MUTEC=ON/OFF[Default: OFF]
: Buildsmutec
source code mutator and adds it to BenchPress's environment. Details: https://github.com/chao-peng/mutec-DBUILD_SRCIROR=ON/OFF[Default: OFF]
: Buildssrciror
text-level and IR mutator and adds it to the environment. Details: https://github.com/TestingResearchIllinois/srciror
After you specify the build environment, cd
into your build directory and:
$: make -j
This will produce all libraries and binaries sandboxed in the build directory. At the root of the source directory an executable script benchpress
will be built:
$: ./benchpress --help
will list all available execution flags for the application.