Repository accompanying the associated Kapernikov blog post.
- OpenCL development files
The build uses cmake. Use the usual cmake incantations with an appropriate generator. Make sure to build a Release build when running the benchmarks (add -DCMAKE_BUILD_TYPE=Release
to the cmake command line). In addition, install the binaries. A custom install folder can be set by passing -DCMAKE_INSTALL_PREFIX=<custom install dir>
to the cmake command line. The default installation directory is /usr/local
. See below for some examples on specific platforms.
Note: Check the .gitlab-ci.yml file for an example system installation and configuration.
The example uses the make
generator.
$ cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release
$ make -C build --jobs 4
$ make -C build install
The required binaries will then be present in the install directory.
The example uses the ninja
generator.
Prepare the build environment:
- Open the appropriate build environment shell
- Make sure that cmake.exe and ninja.exe are in your path
Then execute:
$ cmake -G "Ninja" -H. -Bbuild -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release
$ ninja -C build --jobs 4
$ ninja -C build install
The required binaries will then be present in the install directory.
- A properly functioning OpenCL runtime
- For the benchmarks: A tool to fix your CPU to a specific frequency (e.g. cpupower on *NIX systems)
- For the benchmarks: A binary built in release mode
$ <installation_dir>/bin/benchmark_normal_computation
$ <installation_dir>\bin\benchmark_normal_computation.exe
$ <installation_dir>/bin/test_normal_computation
$ <installation_dir>\bin\test_normal_computation.exe