Skip to main content

Build Status CodeCov Badge PyPi Badge Zenodo Badge SonarCloud Badge OpenSSF Badge FairSoftware Badge

Create optimized GPU applications in any mainstream GPU programming language (CUDA, HIP, OpenCL, OpenACC, OpenMP).

What Kernel Tuner does:

Installation

  • First, make sure you have your CUDA, OpenCL, or HIP 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.

Example

import numpy as np
from kernel_tuner import tune_kernel

kernel_string = """
__global__ void vector_add(float *c, float *a, float *b, int n) {
    int i = blockIdx.x * block_size_x + threadIdx.x;
    if (i<n) {
        c[i] = a[i] + b[i];
    }
}
"""

n = np.int32(10000000)

a = np.random.randn(n).astype(np.float32)
b = np.random.randn(n).astype(np.float32)
c = np.zeros_like(a)

args = [c, a, b, n]

tune_params = {"block_size_x": [32, 64, 128, 256, 512]}

tune_kernel("vector_add", kernel_string, n, args, tune_params)

More examples here.

Resources

Kernel Tuner ecosystem


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: Bug reports, install issues, feature requests, work in progress
  • GitHub Discussion group: General questions, Q&A, thoughts

Contributions 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.

Citation

If you use Kernel Tuner in research or research software, please cite the most relevant among the publications on Kernel Tuner. To refer to the project as a whole, please cite:

@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}
}

Metadata

Release files for kernel-tuner 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kernel-tuner 1.5.0
File Size Uploaded
kernel_tuner-1.5.0.tar.gz 230.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kernel-tuner 1.5.0
File Interpreter ABI Platform
kernel_tuner-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 449.5 kB

Release files / kernel_tuner-1.5.0.tar.gz

Download URL kernel_tuner-1.5.0.tar.gz
Size 230.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c1b6c9469d607457ec9a2e783135f067b2799da19517e2d7bc84e192aee7a273
BLAKE2b-256 checksum
How to use checksums
d90d9c929e8552e9d0c41da269c4f4b1041a470bd9b7f366de06a9136afc972f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / kernel_tuner-1.5.0-py3-none-any.whl

Download URL kernel_tuner-1.5.0-py3-none-any.whl
Size 219.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3aa31663f1166e4817ae17260e5c3b05d33f0de384c2c7cc615fb7c5b9d1bd4
BLAKE2b-256 checksum
How to use checksums
ba9ef6cd43316e605da7e798c7cc5a81e503440b17a23f5cc1f7c04311f91610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page