Please use ClangFormat to properly format the code.
- Visual Studio extension.
- Visual Studio code extension
- Script formatting all files Windows Linux
Submit your changes via pull request. One of the maintainers will review your changes and merge them.
Remember to add a copyright header at the top of newly created files.
A good way to add new benchmarks is to mimic the existing ones and tweak them to your needs. General flow of adding a brand new test is:
- Select binary, that suits you benchmark, for example
memory_benchmark
- Select name for you benchmark, for example
TwoWayTransfer
. - Add definition file of your benchmark as source/benchmarks/
memory_benchmark
/definitions/TwoWayTransfer
.h. This file specifies generic info about your test - its name, description and parameters - Add test registration file as source/benchmarks/
memory_benchmark
/gtest/TwoWayTransfer
.cpp. This file registers your test, so the framework knowns about it and it can be run. - Add implementation file as source/benchmarks/
memory_benchmark
/implementations/ocl/TwoWayTransfer
_ocl.cpp. This file is contains the actual implementation of your test. Substittue ocl with l0 for LevelZero implementation. Each test can be implemented in more than one API. - Regenerate documentation (see below).
Tests documentation is generated from the code and stored in TESTS.md file. Contributors are required to regenerate the documentation by building the run_docs_generator target. No further parameters are needed. The TESTS.md file should be automatically updated.