Contribution guide

Thank you for considering to contribute to Kernel Tuner!

Reporting Issues

Not all contributions are code, creating an issue also helps us to improve. When you create an issue about a problem, please ensure the following:

  • Describe what you expected to happen.

  • If possible, include a minimal example to help us reproduce the issue.

  • Describe what actually happened, including the output of any errors printed.

  • List the version of Python, CUDA or OpenCL, and C compiler, if applicable.

Contributing Code

For contributing code to Kernel Tuner please select an issue to work on or create a new issue to propose a change or addition. For significant changes, it is required to first create an issue and discuss the proposed changes. Then fork the repository, create a branch, one per change or addition, and create a pull request.

Kernel Tuner follows the Google Python style guide, with Sphinxdoc docstrings for module public functions.

Before creating a pull request please ensure the following:

  • You are working in an up-to-date development environment

  • You have written unit tests to test your additions and all unit tests pass (run nox). If you do not have the required hardware, you can run nox -- skip-gpu, or skip-cuda, skip-hip, skip-opencl.

  • The examples still work and produce the same (or better) results

  • An entry about the change or addition is created in CHANGELOG.md

If you are in doubt on where to put your additions to the Kernel Tuner, please have look at the design documentation, or discuss it in the issue regarding your additions.

Simple development setup

For small changes to the code you can setup a quick development environment with the following steps:

  • git clone git@github.com:KernelTuner/kernel_tuner.git

  • cd kernel_tuner

  • pip install -e .

To run the tests in your local Python environment:

  • pip install -r doc/requirements_test.txt

  • pytest -v test

To build the documentation locally:

  • pip install -r doc/requirements.txt

  • cd doc

  • make html

These instructions should be enough for most small contributions. For larger changes, or when you need to change the dependencies of Kernel Tuner, please see the documentation on setting up a full development environment.