Docs

Futhark still suffers from rather spartan documentation. What we have is assembled at Read the Docs. Among other things, you can find a language overview, language reference, and a set of manual pages. You can also find instructions on how to install the Futhark compiler.

If there is something you believe should be documented, but is not, you are very welcome to report the omission as a bug on our bug tracker. See the page Get Involved for more information.

We also have some Haddock-generated documentation of the compiler internals which is automatically updated every night.

Publications

We have published a number of papers on Futhark, and hopefully more will follow in the future. They are presented below in reverse chronological order.

APL on GPUs - A TAIL from the Past, Scribbled in Futhark (PDF)

Presented at FHPC ’16

A paper describing an APL compiler (apltail) that operates by translating APL into a typed array intermediate language (TAIL), and from there into Futhark. While the Futhark details are light, the paper demonstrates a simple use of Futhark as a target language for a compiler. We succeed in achieving decent speedup on several (small) APL programs. The accompanying benchmark suite may be worth a look.

Design and GPGPU Performance of Futhark’s Redomap Construct (PDF)

Presented at ARRAY ’16

A detailed presentation of one of Futhark’s internal language constructs - redomap - which is used to represent various forms of map-reduce-fusion. We present some microbenchmarks implemented in both Thrust and Futhark and discuss their relative performance.

Size Slicing - A Hybrid Approach to Size Inference in Futhark (PDF)

Presented at FHPC ’14

Futhark supports automatic size inference of arrays, and this paper describes our approach, which is based on slicing. The descriptions are still up-to-date, although the Futhark source language has since grown support for user-defined size annotations, which can sometimes enable the compiler to make better assumptions about the shapes of arrays.

Bounds Checking: An Instance of Hybrid Analysis (PDF)

Presented at ARRAY ’14

We implemented a novel form of bounds checking by extracting predicate functions from programs with array indexing. These predicates functioned as sufficient conditions for all bounds checks in the original program: if the extracted predicates evaluated to true, then every array index was guaranteed to be in bounds. The idea is that this produces an efficient alternative to precise bounds checking even for very complicated accesses (such as indirect indexing). The idea works, but was hard to implement and maintain and thus distracted us from our core work, so it is no longer used in the Futhark compiler. Instead, we provide an unsafe keyword that one can use to remove bounds checks that would otherwise hinder parallelisation. In the future, we might return to this work.

A T2 Graph-Reduction Approach To Fusion (PDF)

Presented at FHPC ’13

A presentation of the core of the producer-consumer fusion algorithm in the Futhark compiler (although the language was called L0 at the time). The description of the fundamental algorithm is still correct, although it does not cover some of the newer language additions, nor does it describe horisontal fusion.