https://github.com/kerneltuner/kernel_tuner
Kernel Tuner
https://github.com/kerneltuner/kernel_tuner
auto-tuning autotuning c cplusplus cuda cuda-kernels gpu gpu-computing kernel-tuner machine-learning opencl opencl-kernels optimization python software-development testing
Last synced: 15 days ago
JSON representation
Kernel Tuner
- Host: GitHub
- URL: https://github.com/kerneltuner/kernel_tuner
- Owner: KernelTuner
- License: apache-2.0
- Created: 2016-03-28T13:32:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-09T07:58:43.000Z (20 days ago)
- Last Synced: 2025-04-13T06:50:27.414Z (16 days ago)
- Topics: auto-tuning, autotuning, c, cplusplus, cuda, cuda-kernels, gpu, gpu-computing, kernel-tuner, machine-learning, opencl, opencl-kernels, optimization, python, software-development, testing
- Language: Python
- Homepage: https://kerneltuner.github.io/kernel_tuner/
- Size: 40.9 MB
- Stars: 326
- Watchers: 8
- Forks: 53
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Citation: CITATION.cff
- Zenodo: .zenodo.json
Awesome Lists containing this project
README
![]()
---
[](https://github.com/KernelTuner/kernel_tuner/actions/workflows/test-python-package.yml)
[](https://codecov.io/gh/KernelTuner/kernel_tuner)
[](https://pypi.python.org/pypi/kernel_tuner/)
[](https://zenodo.org/badge/latestdoi/54894320)
[](https://sonarcloud.io/dashboard?id=KernelTuner_kernel_tuner)
[](https://bestpractices.coreinfrastructure.org/projects/6573)
[](https://fair-software.eu)
---Create optimized GPU applications in any mainstream GPU
programming language (CUDA, HIP, OpenCL, OpenACC).What Kernel Tuner does:
- Works as an external tool to benchmark and optimize GPU kernels in isolation
- Can be used directly on existing kernel code without extensive changes
- Can be used with applications in any host programming language
- Blazing fast search space construction
- More than 20 [optimization algorithms](https://kerneltuner.github.io/kernel_tuner/stable/optimization.html) to speedup tuning
- Energy measurements and optimizations [(power capping, clock frequency tuning)](https://arxiv.org/abs/2211.07260)
- ... and much more! For example, [caching](https://kerneltuner.github.io/kernel_tuner/stable/cache_files.html), [output verification](https://kerneltuner.github.io/kernel_tuner/stable/correctness.html), [tuning host and device code](https://kerneltuner.github.io/kernel_tuner/stable/hostcode.html), [user defined metrics](https://kerneltuner.github.io/kernel_tuner/stable/metrics.html), see [the full documentation](https://kerneltuner.github.io/kernel_tuner/stable/index.html).## Installation
- First, make sure you have your [CUDA](https://kerneltuner.github.io/kernel_tuner/stable/install.html#cuda-and-pycuda), [OpenCL](https://kerneltuner.github.io/kernel_tuner/stable/install.html#opencl-and-pyopencl), or [HIP](https://kerneltuner.github.io/kernel_tuner/stable/install.html#hip-and-hip-python) compiler installed
- Then type: `pip install kernel_tuner[cuda]`, `pip install kernel_tuner[opencl]`, or `pip install kernel_tuner[hip]`
- or why not all of them: `pip install kernel_tuner[cuda,opencl,hip]`More information on installation, also for other languages, in the [installation guide](http://kerneltuner.github.io/kernel_tuner/stable/install.html).
## Example
```python
import numpy as np
from kernel_tuner import tune_kernelkernel_string = """
__global__ void vector_add(float *c, float *a, float *b, int n) {
int i = blockIdx.x * block_size_x + threadIdx.x;
if (i
C++ magic to integrate auto-tuned kernels into C++ applications
C++ data types for mixed-precision CUDA kernel programming
Monitor, analyze, and visualize auto-tuning runs## Communication & Contribution
- GitHub [Issues](https://github.com/KernelTuner/kernel_tuner/issues): Bug reports, install issues, feature requests, work in progress
- GitHub [Discussion group](https://github.com/orgs/KernelTuner/discussions): General questions, Q&A, thoughtsContributions are welcome! For feature requests, bug reports, or usage problems, please feel free to create an issue.
For more extensive contributions, check the [contribution guide](http://kerneltuner.github.io/kernel_tuner/stable/contributing.html).## Citation
If you use Kernel Tuner in research or research software, please cite the most relevant among the [publications on Kernel
Tuner](https://kerneltuner.github.io/kernel_tuner/stable/#citation). To refer to the project as a whole, please cite:```latex
@article{kerneltuner,
author = {Ben van Werkhoven},
title = {Kernel Tuner: A search-optimizing GPU code auto-tuner},
journal = {Future Generation Computer Systems},
year = {2019},
volume = {90},
pages = {347-358},
url = {https://www.sciencedirect.com/science/article/pii/S0167739X18313359},
doi = {https://doi.org/10.1016/j.future.2018.08.004}
}
```