Strategy Preserving Compilation for Parallel Functional Code
نویسندگان
چکیده
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. These 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 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.
منابع مشابه
Interprocedural Compilation of Fortran D (extended Version) Interprocedural Compilation of Fortran D
Fortran D is a version of Fortran extended with data decomposition speciications. It is designed to provide a machine-independent programming model for data-parallel applications and has heavily innuenced the design of High Performance Fortran (HPF). In previous work we described Fortran D compilation algorithms for individual procedures. This paper presents an interprocedural approach to analy...
متن کاملA Advances in Dynamic Compilation for Functional Data Parallel Array Processing
Data-parallel processing of multi-dimensional arrays is characterized by a fundamental trade-off between software engineering principles on the one hand and runtime performance concerns on the other hand. Whereas the former demand code to be written in a generic style abstracting from structural properties of arrays as much as possible, the latter require an optimizing compiler to have as much ...
متن کاملCompiling Functional Code for System-Level Environment
Compilation of programming languages based on λ–calculus to standalone, low-level machine code involves a challenge of removing automatic memory management that is usually required for supporting implicit allocations produced by currently available compilers. We propose a compilation approach that is able to convert pure, lazily-evaluated functional code to machine code suitable for running on ...
متن کاملRegister Allocation Optimization in a Kaffe Based Dynamic Compilation
Dynamic compilation and optimization are widely used in heterogeneous computing environments, in which an intermediate form of the code is compiled to native code during execution. An important tradeoff exists between the amount of time spent dynamically optimizing the program and the running time of the program. In this paper, we explore this trade-off for an important optimization – global re...
متن کاملOn deriving data parallel code from a functional program
We discuss a translation methodology for transforming a high level algorithmic speciication written in Alpha to an imperative data parallel language. We informally introduce the Alpha language with the aid of an example and explain how it is adapted for doing static analysis and transformation. An Alpha program can be naively compiled 11] using applicative caching. Our compilation method makes ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1710.08332 شماره
صفحات -
تاریخ انتشار 2017