test.pypi.org Open in urlscan Pro
2a04:4e42:400::319  Public Scan

Submitted URL: https://testpypi.python.org/pypi/kernel_tuner
Effective URL: https://test.pypi.org/project/kernel_tuner/
Submission Tags: falconsandbox
Submission: On March 15 via api from US — Scanned from DE

Form analysis 3 forms found in the DOM

/search/

<form class="search-form search-form--primary" action="/search/" role="search">
  <label for="search" class="sr-only">PyPI durchsuchen</label>
  <input id="search" class="search-form__search" type="text" name="q" placeholder="Projekte suchen" value="" autocomplete="off" autocapitalize="off" spellcheck="false" data-controller="search-focus"
    data-action="keydown@window->search-focus#focusSearchField" data-search-focus-target="searchField">
  <button type="submit" class="search-form__button">
    <i class="fa fa-search" aria-hidden="true"></i>
    <span class="sr-only">Suche</span>
  </button>
</form>

/search/

<form class="search-form search-form--fullwidth" action="/search/" role="search">
  <label for="mobile-search" class="sr-only">PyPI durchsuchen</label>
  <input id="mobile-search" class="search-form__search" type="text" name="q" placeholder="Projekte suchen" value="" autocomplete="off" autocapitalize="off" spellcheck="false">
  <button type="submit" class="search-form__button">
    <i class="fa fa-search" aria-hidden="true"></i>
    <span class="sr-only">Suche</span>
  </button>
</form>

/locale/

<form action="/locale/">
  <ul>
    <li>
      <button name="locale_id" value="en" type="submit"> English </button>
    </li>
    <li>
      <button name="locale_id" value="es" type="submit"> español </button>
    </li>
    <li>
      <button name="locale_id" value="fr" type="submit"> français </button>
    </li>
    <li>
      <button name="locale_id" value="ja" type="submit"> 日本語 </button>
    </li>
    <li>
      <button name="locale_id" value="pt_BR" type="submit"> português (Brasil) </button>
    </li>
    <li>
      <button name="locale_id" value="uk" type="submit"> українська </button>
    </li>
    <li>
      <button name="locale_id" value="el" type="submit"> Ελληνικά </button>
    </li>
    <li>
      <button class="language-switcher__selected" name="locale_id" value="de" type="submit"> Deutsch </button>
    </li>
    <li>
      <button name="locale_id" value="zh_Hans" type="submit"> 中文 (简体) </button>
    </li>
    <li>
      <button name="locale_id" value="zh_Hant" type="submit"> 中文 (繁體) </button>
    </li>
    <li>
      <button name="locale_id" value="ru" type="submit"> русский </button>
    </li>
    <li>
      <button name="locale_id" value="he" type="submit"> עברית </button>
    </li>
    <li>
      <button name="locale_id" value="eo" type="submit"> esperanto </button>
    </li>
  </ul>
</form>

Text Content

Zum Hauptinhalt springen Zur mobilen Version wechseln
Warnung Sie verwenden TestPyPI - eine separate Instanz des Python-Paketindex,
mit der Sie Verteilungstools und -prozesse ausprobieren können, ohne den realen
Index zu beeinflussen.
Warnung Einige Funktionen sind möglicherweise ohne JavaScript nicht nutzbar.
Bitte versuchen Sie es mit aktiviertem JavaScript, falls Probleme auftreten.



PyPI durchsuchen Suche
 * Hilfe
 * Sponsoren
 * Einloggen
 * Registrieren

Menü
 * Hilfe
 * Sponsoren
 * Einloggen
 * Registrieren

PyPI durchsuchen Suche


KERNEL_TUNER 0.1.1

pip install -i https://test.pypi.org/simple/ kernel_tuner PIP Anweisungen
kopieren

Neueste Version

Veröffentlicht am: 2. März 2017

A simple CUDA/OpenCL kernel tuner in Python




NAVIGATION

 * Projekt-Beschreibung
 * Veröffentlichungs-Historie
 * Dateien zum Herunterladen


PROJEKT-LINKS

 * Homepage


STATISTIKEN

Besuchen Sie Libraries.io oder benutzen Sie unseren öffentlichen Datensatz auf
Google BigQuery, um Statistiken für dieses Projekt zu sehen


META

Lizenz: Apache Software License (Apache 2.0)

Autor: Ben van Werkhoven

Schlagwörter auto-tuning, gpu, computing, pycuda, cuda, pyopencl, opencl


BETREUER

benvanwerkhoven


KATEGORIEN

 * Development Status
   * 4 - Beta
 * Environment
   * Console
 * Intended Audience
   * Developers
   * Education
   * Science/Research
 * License
   * OSI Approved :: Apache Software License
 * Natural Language
   * English
 * Operating System
   * POSIX :: Linux
 * Programming Language
   * Python :: 2.7
   * Python :: 3.5
 * Topic
   * Scientific/Engineering
   * Software Development
   * System :: Distributed Computing

Capital One is a Maintaining sponsor of the Python Software Foundation.
PSF Sponsor · Served ethically
 * Projekt-Beschreibung
 * Projekt-Details
 * Veröffentlichungs-Historie
 * Dateien zum Herunterladen


PROJEKT-BESCHREIBUNG

The goal of this project is to provide a - as simple as possible - tool for
tuning CUDA and OpenCL kernels. This implies that any CUDA or OpenCL kernel can
be tuned without requiring extensive changes to the original kernel code.

A very common problem in GPU programming is that some combination of thread
block dimensions and other kernel parameters, like tiling or unrolling factors,
results in dramatically better performance than other kernel configurations. The
goal of auto-tuning is to automate the process of finding the best performing
configuration for a given device.

This kernel tuner aims that you can directly use the tuned kernel without
introducing any new dependencies. The tuned kernels can afterwards be used
independently of the programming environment, whether that is using
C/C++/Java/Fortran or Python doesn’t matter.

The kernel_tuner module currently only contains main one function which is
called tune_kernel to which you pass at least the kernel name, a string
containing the kernel code, the problem size, a list of kernel function
arguments, and a dictionary of tunable parameters. There are also a lot of
optional parameters, for a complete list see the full documentation of
tune_kernel.


DOCUMENTATION

The full documentation is available here.


INSTALLATION

install from PyPi, install with:

pip install kernel_tuner

To install from the source (and get the examples): clone the repository

git clone git@github.com:benvanwerkhoven/kernel_tuner.git

change into the top-level directory

cd kernel_tuner

install using

pip install .


DEPENDENCIES

Python

Python 2.7 or Python 3.5

PyCuda and/or PyOpenCL (https://mathema.tician.de/software/)
 * To tune CUDA kernels
   
   pip install pycuda

 * To tune OpenCL kernels
   
   pip install pyopencl


EXAMPLE USAGE

The following shows a simple example for tuning a CUDA 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];
    }
}
"""

size = 10000000
problem_size = (size, 1)

a = numpy.random.randn(size).astype(numpy.float32)
b = numpy.random.randn(size).astype(numpy.float32)
c = numpy.zeros_like(b)
n = numpy.int32(size)
args = [c, a, b, n]

tune_params = dict()
tune_params["block_size_x"] = [128+64*i for i in range(15)]

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

The exact same Python code can be used to tune an OpenCL kernel:

kernel_string = """
__kernel void vector_add(__global float *c, __global float *a, __global float *b, int n) {
    int i = get_global_id(0);
    if (i<n) {
        c[i] = a[i] + b[i];
    }
}
"""

Or even just a C function, see the example here.

You can find these and many - more extensive - example codes, in the examples
directory.

See the full documentation for several highly detailed tutorial-style
explanations of example kernels and the scripts to tune them.


TUNING HOST AND KERNEL CODE

It is also possible to tune for combinations of tunable parameters in both host
and kernel code. This allows for a number of powerfull things, such as tuning
the number of streams for a kernel that uses CUDA Streams or OpenCL Command
Queues to overlap transfers between host and device with kernel execution. This
can be done in combination with tuning the parameters inside the kernel code.
See the convolution_streams example code and the documentation for a detailed
explanation of the kernel tuner Python script.


CORRECTNESS VERIFICATION

Optionally, you can let the kernel tuner verify the output of every kernel it
compiles and benchmarks, by passing an answer list. This list matches the list
of arguments to the kernel, but contains the expected output of the kernel.
Input arguments are replaced with None.

answer = [a+b, None, None]  # the order matches the arguments (in args) to the kernel
tune_kernel("vector_add", kernel_string, problem_size, args, tune_params, answer=answer)


CONTRIBUTION GUIDE

The kernel tuner follows the Google Python style guide, with Sphinxdoc
docstrings for module public functions. If you want to contribute to the project
please fork it, create a branch including your addition, and create a pull
request.

The tests use relative imports and can be run directly after making changes to
the code. To run all tests use nosetests in the main directory. To run the
examples after code changes, you need to run pip install --upgrade . in the main
directory. Documentation is generated by typing make html in the doc directory,
the contents of doc/build/html/ should then be copied to sphinxdoc directory of
the gh-pages branch.

Before creating a pull request please ensure the following:

 * You have written unit tests to test your additions and all unit tests pass

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

 * The code is compatible with both Python 2.7 and Python 3.5

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

Contributing authors so far:

 * Ben van Werkhoven

 * Berend Weel


RELATED WORK

You may also like CLTune by Cedric Nugteren. CLTune is a C++ library for kernel
tuning and supports various advanced features like machine learning to optimize
the time spent on tuning kernels.


PROJEKT-DETAILS


PROJEKT-LINKS

 * Homepage


STATISTIKEN

Besuchen Sie Libraries.io oder benutzen Sie unseren öffentlichen Datensatz auf
Google BigQuery, um Statistiken für dieses Projekt zu sehen


META

Lizenz: Apache Software License (Apache 2.0)

Autor: Ben van Werkhoven

Schlagwörter auto-tuning, gpu, computing, pycuda, cuda, pyopencl, opencl


BETREUER

benvanwerkhoven


KATEGORIEN

 * Development Status
   * 4 - Beta
 * Environment
   * Console
 * Intended Audience
   * Developers
   * Education
   * Science/Research
 * License
   * OSI Approved :: Apache Software License
 * Natural Language
   * English
 * Operating System
   * POSIX :: Linux
 * Programming Language
   * Python :: 2.7
   * Python :: 3.5
 * Topic
   * Scientific/Engineering
   * Software Development
   * System :: Distributed Computing



VERÖFFENTLICHUNGS-HISTORIE VERÖFFENTLICHUNGS-BENACHRICHTIGUNGEN | RSS FEED

Diese Version


0.1.1

2. März 2017

0.1.0

2. Nov. 2016


DATEIEN ZUM HERUNTERLADEN

Laden Sie die Datei für Ihre Plattform herunter. Wenn Sie nicht sicher sind, was
Sie auswählen sollen, lesen Sie Installation von Paketen.


SOURCE DISTRIBUTION

kernel_tuner-0.1.1.tar.gz (26.0 kB view hashes)

Uploaded 2. März 2017 source

Schließen


HASH-CODES FÜR KERNEL_TUNER-0.1.1.TAR.GZ

Hash-Codes für kernel_tuner-0.1.1.tar.gz Algorithmus Hashwert SHA256
8a627d2c4905c4d435adff1a1651317488c19835efb81778a69556c4e72f0471 Kopieren MD5
b7c36f82dd23d149c15a887fd5a397eb Kopieren BLAKE2b-256
ea268f040e3d239322d963bf826642af5bbd0bf44d018ffc4066696af2ffe0cb Kopieren

Schließen


HILFE

 * Installieren von Paketen
 * Hochladen von Paketen
 * Bedienungsanleitung
 * Project name retention
 * Häufige Fragen


ÜBER PYPI

 * PyPI bei Twitter
 * Infrastruktur Übersicht
 * Statistiken
 * Logos & trademarks
 * Unsere Sponsoren


MITWIRKEN BEI PYPI

 * Fehler und Rückmeldungen
 * Mitwirken auf GitHub
 * PyPI übersetzen
 * Sponsor PyPI
 * Entwicklungs-Anerkennungen


PYPI VERWENDEN

 * Verhaltensrichtlinien
 * Sicherheitsproblem melden
 * Datenschutz
 * Nutzungsbedingungen
 * Acceptable Use Policy

--------------------------------------------------------------------------------

Entwickelt und gepflegt von der Python-Community, für die Python-Community.
Spenden Sie noch heute!

"PyPI", "Python Package Index", and the blocks logos are registered trademarks
of the Python Software Foundation.


© 2023 Python Software Foundation
Sitemap

Zur Desktop-Version wechseln
 * English
 * español
 * français
 * 日本語
 * português (Brasil)
 * українська
 * Ελληνικά
 * Deutsch
 * 中文 (简体)
 * 中文 (繁體)
 * русский
 * עברית
 * esperanto

Supported by

Python Software Foundation PSF Sponsor