Skip to content

toolkitICL: an open source tool for automated OpenCL kernel execution.

Notifications You must be signed in to change notification settings

Kostaszki/toolkitICL

 
 

Repository files navigation

toolkitICL

License Build Status Appveyor Build Status Travis

toolkitICL is an open source tool for automated OpenCL kernel execution. It can be used as an easy to use cross platform tool to execute a set of kernels for example on compute clusters, run automated OpenCL benchmarks or test and validate kernels. HDF5 files are used for the entire configuration and data handling. The list of kernels to be executed, all variables and the workgroup size is defined in the input HDF5 file. After execution, the output data, data copy- and runtime is written to the output HDF5 file. The GPU power consumption and temperature for supported Nvidia GPUs can also be logged automatically to the output HDF file.

Setup

To build toolkitCL the following needs to be installed:

  • OpenCL (headers and drivers)
  • HDF5
  • CMake
  • CUDA Toolkit (only for NVidia GPU power/temperature logging)

In case some of the OpenCL headers are missing, they can be obtained directly from Khronos: https://github.com/KhronosGroup. On some compute cluster systems, it might be necessary to explicitly define the library path in the cmake configuration files. If no icd loader is available, the path to the OpenCL vendor library hast to be defined manually.

This project uses the common CMake build system. Thus, the following commands can be used on Linux.

mkdir build && cd build
cmake .. # if you want to build only the main executable toolkitICL
make

If you want to build the tests, you can run

mkdir build && cd build
cmake -DTESTS=ON .. # if you want to build also the tests
make
make test

If you want to change the default compiler, the usual CMake workflow is supported, i.e. you can use something like

mkdir build && cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
make

Recent versions of Visual Studio should automatically detect the cmake configuration files and build toolkitICL automatically. Otherwise cmake-gui can be used on Windows systems to create Visul Studio project files.

If the CUDA toolkit is detected, CMake will enable CUDA support for power and temperature logging automatically. It can also be controlled manually (in the source code) using the USENVML define.

Usage

Examples on how to create the input HDF5 files are provided in the directory notebooks.

ToolkitICL can be controlled by the following command line options:

  • -d device_id: Use the device specified by device_id.
  • -b: Activate benchmark mode (minimal console logs, additional delay before & after runs).
  • -c config.h5: Specify the URL config.h5 of the HDF5 configuration file.
  • -np sample_rate: Log Nvidia GPU power consumption with sample_rate (ms).
  • -nt sample_rate: Log Nvidia GPU temperature with sample_rate (ms).

A useful tool to view and edit HDF5 files is HDFView.

License

This project is licensed under the terms of the Creative Commons CC BY-NC-ND 4.0 license.

Disclaimer

Product and company names may be trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or their affiliates. Everything is provided as is and without warranty. Use at your own risk!

About

toolkitICL: an open source tool for automated OpenCL kernel execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 74.8%
  • Jupyter Notebook 13.9%
  • CMake 6.4%
  • MATLAB 2.3%
  • Julia 2.1%
  • Shell 0.5%