by Department of Computer Science at the University of Copenhagen
Data-parallel, functional array language designed to be compiled to highly performant GPU code.

Futhark is a small programming language designed to be compiled to highly performant GPU code. It is a statically typed, data-parallel, and purely functional array language, and comes with a heavily optimising ahead-of-time compiler that generates GPU code via OpenCL. Futhark is not designed for graphics programming, but instead uses the compute power of the GPU to accelerate data-parallel array computations. We support regular nested data-parallelism, as well as a form of imperative-style in-place modification of arrays, while still preserving the overall purity of the language via the use of a uniqueness type system.

The Futhark language and compiler is an ongoing research project. It can compile nontrivial programs which then run on real GPUs at very high speed. The Futhark language itself is still very spartan - due to the basic design criteria requiring the ability to generate high-performance GPU code, it takes more effort to support language features that are common in languages with more forgiving compilation targets. Nevertheless, Futhark can already be used for nontrivial programs. We are actively looking for more potential applications as well as people who are interested in contributing to the language design.

Futhark is not intended to replace your existing languages. Our intended use case is that Futhark is only used for relatively small but compute-intensive parts of an application. The Futhark compiler generates code that can be easily integrated with non-Futhark code.

fun int fact(int n) = reduce(*, 1, map(1+, iota(n)))

fun int main(int n) = fact(n)
Information updated 05/09/16
View Comments