A code generator for array-based code on CPUs and GPUs
Python Other
Latest commit 32e23d2 Dec 30, 2016 @inducer Merge branch 'barrier-insertion-dont-special-case-waw' into 'master'
Barrier insertion: Don't treat write-after-write self-dependencies as

See merge request !77
Failed to load latest commit information.
bin Allow running CLI as python -m loopy Mar 29, 2016
build-helpers Attempt to fix CentOS binary build May 26, 2016
contrib/floopy-highlighting Get floopy highlighting to work Jun 22, 2015
doc Remove ambiguity warning from the scheduler Dec 13, 2016
loopy Barrier insertion: Don't treat write-after-write self-dependencies as Dec 30, 2016
test Merge branch 'master' into barrier-insertion-with-finer-dependency-tr… Dec 23, 2016
.gitignore Ignore pytest's cache directory Aug 9, 2016
.gitlab-ci.yml Enable running Flake8 during CI Nov 30, 2016
.gitmodules Refactor to introduce a separate C backend May 3, 2015
MANIFEST.in Release/dep fixes Jul 14, 2016
README.rst Add targets, remove pyopencl requirement Feb 8, 2015
TODO Add TODO Apr 9, 2015
requirements-old-pyopencl.txt Update old-pyopencl requirements file May 17, 2016
setup.cfg Start including stats code in flake8 run Dec 6, 2016


Loopy lets you easily generate the tedious, complicated code that is necessary to get good performance out of GPUs and multi-core CPUs.

Places on the web related to Loopy:

Loopy's core idea is that a computation should be described simply and then transformed into a version that gets high performance. This transformation takes place under user control, from within Python.

It can capture the following types of optimizations:

  • Vector and multi-core parallelism in the OpenCL/CUDA model
  • Data layout transformations (structure of arrays to array of structures)
  • Loopy Unrolling
  • Loop tiling with efficient handling of boundary cases
  • Prefetching/copy optimizations
  • Instruction level parallelism
  • and many more

Loopy targets array-type computations, such as the following:

  • dense linear algebra,
  • convolutions,
  • n-body interactions,
  • PDE solvers, such as finite element, finite difference, and Fast-Multipole-type computations

It is not (and does not want to be) a general-purpose programming language.

Loopy is licensed under the liberal MIT license and free for commercial, academic, and private use. All of Loopy's dependencies can be automatically installed from the package index after using:

pip install loo.py

In addition, Loopy is compatible with and enhances pyopencl.