Strategy Preserving Compilation for Parallel Functional Code

10/23/2017
by   Robert Atkey, et al.
0

Graphics Processing Units (GPUs) and other parallel devices are widely available and have the potential for accelerating a wide class of algorithms. However, expert programming skills are required to achieving maximum performance. hese devices expose low-level hardware details through imperative programming interfaces where programmers explicity encode device-specific optimisation strategies. This inevitably results in non-performance-portable programs delivering suboptimal performance on other devices. Functional programming models have recently seen a renaissance in the systems community as they offer possible solutions for tackling the performance portability challenge. Recent work has shown how to automatically choose high-performance parallelisation strategies for a wide range of hardware architectures encoded in a functional representation. However, the translation of such functional representations to the imperative program expected by the hardware interface is typically performed ad hoc with no correctness guarantees and no guarantees to preserve the intended parallelisation strategy. In this paper, we present a formalised strategy-preserving translation from high-level functional code to low-level data race free parallel imperative code. This translation is formulated and proved correct within a language we call Data Parallel Idealised Algol (DPIA), a dialect of Reynolds' Idealised Algol. Performance results on GPUs and a multicore CPU show that the formalised translation process generates low-level code with performance on a par with code generated from ad hoc approaches.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/06/2020

A Language for Describing Optimization Strategies

Optimizing programs to run efficiently on modern parallel hardware is ha...
research
08/29/2019

ICurry

FlatCurry is a well-established intermediate representation of Curry pro...
research
03/29/2016

Compilation as a Typed EDSL-to-EDSL Transformation

This article is about an implementation and compilation technique that i...
research
11/08/2022

Do Mutable Variables Have Reference Types?

Implicit heterogeneous metaprogramming (a.k.a. offshoring) is an attract...
research
02/22/2023

A Unified Cloud-Enabled Discrete Event Parallel and Distributed Simulation Architecture

Cloud simulation environments today are largely employed to model and si...
research
10/01/2020

ReactiFi: Reactive Programming of Wi-Fi Firmware on Mobile Devices

Network programmability will be required to handle future increased netw...
research
08/31/2023

Excel as a Turing-complete Functional Programming Environment

Since the calculation engine of Excel was the subject of a major upgrade...

Please sign up or login with your details

Forgot password? Click here to reset