GithubHelp home page GithubHelp logo

webclinic017 / kernel_tuner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kerneltuner/kernel_tuner

0.0 0.0 0.0 7.66 MB

Kernel Tuner

Home Page: http://benvanwerkhoven.github.io/kernel_tuner/

License: Apache License 2.0

Python 100.00%

kernel_tuner's Introduction


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

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

kernel_tuner's People

Contributors

abelsiqueira avatar anantzoid avatar benvanwerkhoven avatar bouweandela avatar csbnw avatar dependabot[bot] avatar egpbos avatar felipez avatar fjwillemsen avatar hannospreeuw avatar hiker avatar ipelupessy avatar isazi avatar jhidding avatar liuliujie avatar loostrum avatar milolurati avatar nicorenaud avatar sakehl avatar schoonhovenrichard avatar stijnh avatar wjp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.