AccelerateHS/accelerate

Name: accelerate

Owner: Data.Array.Accelerate

Description: Embedded language for high-performance array computations

Created: 2011-04-08 02:50:11.0

Updated: 2018-01-16 02:10:01.0

Pushed: 2018-01-15 11:00:22.0

Homepage: http://www.acceleratehs.org

Size: 13850

Language: Haskell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

An Embedded Language for Accelerated Array Computations

Travis AppVeyor Hackage Stackage LTS Stackage Nightly Gitter chat

Data.Array.Accelerate defines an embedded language of array computations for high-performance computing in Haskell. Computations on multi-dimensional, regular arrays are expressed in the form of parameterised collective operations (such as maps, reductions, and permutations). These computations are online-compiled and executed on a range of architectures.

For more details, see our papers:

There are also slides from some fairly recent presentations:

Chapter 6 of Simon Marlow's book Parallel and Concurrent Programming in Haskell contains a tutorial introduction to Accelerate.

Trevor's PhD thesis details the design and implementation of frontend optimisations and CUDA backend.

Table of Contents

A simple example

As a simple example, consider the computation of a dot product of two vectors of single-precision floating-point numbers:

dotp :: Acc (Vector Float) -> Acc (Vector Float) -> Acc (Scalar Float)
dotp xs ys = fold (+) 0 (zipWith (*) xs ys)

Except for the type, this code is almost the same as the corresponding Haskell code on lists of floats. The types indicate that the computation may be online-compiled for performance; for example, using Data.Array.Accelerate.LLVM.PTX.run it may be on-the-fly off-loaded to a GPU.

Availability

Package accelerate is available from

Additional components

The following supported add-ons are available as separate packages:

Install them from Hackage with cabal install PACKAGENAME.

Documentation
Examples
accelerate-examples

The accelerate-examples package provides a range of computational kernels and a few complete applications. To install these from Hackage, issue cabal install accelerate-examples. The examples include:

Mandelbrot Raytracer

LULESH

LULESH-accelerate is in implementation of the Livermore Unstructured Lagrangian Explicit Shock Hydrodynamics (LULESH) mini-app. LULESH represents a typical hydrodynamics code such as ALE3D, but is a highly simplified application, hard-coded to solve the Sedov blast problem on an unstructured hexahedron mesh.

LULESH mesh

? ? ? (Lol)

? ? ? (Lol) is a general-purpose library for ring-based lattice cryptography. Lol has applications in, for example, symmetric-key somewhat-homomorphic encryption schemes. The lol-accelerate package provides an Accelerate backend for Lol.

Additional examples

Accelerate users have also built some substantial applications of their own. Please feel free to add your own examples!

Mailing list and contacts

The maintainers of Accelerate are Manuel M T Chakravarty chak@cse.unsw.edu.au and Trevor L McDonell tmcdonell@cse.unsw.edu.au.

Citing Accelerate

If you use Accelerate for academic research, you are encouraged (though not required) to cite the following papers (BibTeX):

Accelerate is primarily developed by academics, so citations matter a lot to us. As an added benefit, you increase Accelerate's exposure and potential user (and developer!) base, which is a benefit to all users of Accelerate. Thanks in advance!

What's missing?

Here is a list of features that are currently missing:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.