A Language for Describing Optimization Strategies

02/06/2020
by   Bastian Hagedorn, et al.
0

Optimizing programs to run efficiently on modern parallel hardware is hard but crucial for many applications. The predominantly used imperative languages - like C or OpenCL - force the programmer to intertwine the code describing functionality and optimizations. This results in a nightmare for portability which is particularly problematic given the accelerating trend towards specialized hardware devices to further increase efficiency. Many emerging DSLs used in performance demanding domains such as deep learning, automatic differentiation, or image processing attempt to simplify or even fully automate the optimization process. Using a high-level - often functional - language, programmers focus on describing functionality in a declarative way. In some systems such as Halide or TVM, a separate schedule specifies how the program should be optimized. Unfortunately, these schedules are not written in well-defined programming languages. Instead, they are implemented as a set of ad-hoc predefined APIs that the compiler writers have exposed. In this paper, we present Elevate: a functional language for describing optimization strategies. Elevate follows a tradition of prior systems used in different contexts that express optimization strategies as composition of rewrites. In contrast to systems with scheduling APIs, in Elevate programmers are not restricted to a set of built-in optimizations but define their own optimization strategies freely in a composable way. We show how user-defined optimization strategies in Elevate enable the effective optimization of programs expressed in a functional data-parallel language demonstrating competitive performance with Halide and TVM.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2023

Using Rewrite Strategies for Efficient Functional Automatic Differentiation

Automatic Differentiation (AD) has become a dominant technique in ML. AD...
research
01/18/2022

Lambda the Ultimate SSA: Optimizing Functional Programs in SSA

Static Single Assignment (SSA) is the workhorse of modern optimizing com...
research
10/23/2017

Strategy Preserving Compilation for Parallel Functional Code

Graphics Processing Units (GPUs) and other parallel devices are widely a...
research
09/01/2020

Building Application-Specific Overlays on FPGAs with High-Level Customizable IPs

Overlays are virtual, re-configurable architectures that overlay on top ...
research
07/27/2021

Guided Optimization for Image Processing Pipelines

Writing high-performance image processing code is challenging and labor-...
research
11/25/2021

Sketch-Guided Equality Saturation: Scaling Equality Saturation to Complex Optimizations of Functional Programs

Generating high-performance code for diverse hardware and application do...
research
03/04/2022

Deoptless: Speculation with Dispatched On-Stack Replacement and Specialized Continuations

Just-in-time compilation provides significant performance improvements f...

Please sign up or login with your details

Forgot password? Click here to reset