Skip to content
Tech News
← Back to articles

Accelerate – Embedded language for high-performance array computations

read original more articles
Why This Matters

Accelerate introduces an embedded language in Haskell for high-performance array computations, enabling efficient execution across various architectures including GPUs and multicore CPUs. This advancement simplifies writing parallel array operations, making high-performance computing more accessible to Haskell developers and potentially accelerating scientific and data-intensive applications.

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