Skip to content
Tech News
← Back to articles

Accelerate

read original more articles
Why This Matters

The introduction of Data.Array.Accelerate signifies a major advancement in high-performance computing within the Haskell ecosystem, enabling developers to write array-based computations that are efficiently compiled and executed across diverse architectures, including GPUs and multicore CPUs. This development empowers both researchers and consumers by providing a flexible, high-level tool for accelerating data-intensive tasks, fostering innovation in parallel processing and scientific computing.

Key Takeaways

High-performance parallel arrays for Haskell

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 presentations on Accelerate:

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)

... continue reading