Achieving High-Performance the Functional Way - A Functional Pearl on Expressing High-Performance Optimizations as Rewrite Strategies
Tue 25 Aug 2020 02:30 - 02:45 at ICFP Asia 2 - Asia 2 Chair(s): Alan Jeffrey
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 portability nightmare that 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 or high-performance 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 functional pearl, we show how to employ functional programming techniques to solve this challenge with elegance. We present two functional languages that work together - each addressing a separate concern. RISE is a functional language for expressing computations using well known functional data-parallel patterns. ELEVATE is a functional language for describing optimization strategies. A high-level RISE program is transformed into a low-level form using optimization strategies written in ELEVATE. From the rewritten low-level program high-performance parallel code is automatically generated. In contrast to existing high-performance domain-specific systems with scheduling APIs, in our approach programmers are not restricted to a set of built-in operations and optimizations but freely define their own computational patterns in RISE and optimization strategies in ELEVATE in a composable and reusable way. We show how our holistic functional approach achieves competitive performance with the state-of-the-art imperative systems Halide and TVM.
Mon 24 AugDisplayed time zone: Eastern Time (US & Canada) change
14:30 - 16:30 | |||
14:30 15mTalk | Achieving High-Performance the Functional Way - A Functional Pearl on Expressing High-Performance Optimizations as Rewrite Strategies ICFP Program Bastian Hagedorn University of Münster, Germany, Johannes Lenfers University of Münster, Thomas Koehler University of Glasgow, United Kingdom, Xueying Qin University of Glasgow, United Kingdom, Sergei Gorlatch University of Münster, Germany, Michel Steuwer The University of Edinburgh DOI Media Attached | ||
14:45 15mTalk | Staged Selective Parser Combinators ICFP Program Jamie Willis Imperial College London, Nicolas Wu Imperial College London, UK, Matthew Pickering University of Bristol, UK DOI Media Attached | ||
15:00 15mTalk | Kindly Bent to Free Us ICFP Program Gabriel Radanne Inria, Hannes Saffrich University of Freiburg, Peter Thiemann University of Freiburg, Germany DOI Pre-print Media Attached File Attached | ||
15:15 15mTalk | Sealing Pointer-Based Optimizations Behind Pure Functions ICFP Program Daniel Selsam Microsoft Research, Simon Hudon Carnegie Mellon University, Leonardo de Moura Microsoft Research, n.n. DOI Media Attached | ||
15:30 15mTalk | Effects for Efficiency: Asymptotic Speedup with First-Class Control ICFP Program Daniel Hillerström The University of Edinburgh, Sam Lindley Heriot-Watt University, UK / The University of Edinburgh, UK, John Longley The University of Edinburgh DOI Media Attached | ||
15:45 15mTalk | Computation Focusing ICFP Program DOI Media Attached | ||
16:00 15mTalk | Retrofitting Parallelism onto OCamlDistinguished Paper ICFP Program KC Sivaramakrishnan IIT Madras, Stephen Dolan University of Cambridge, UK, Leo White Jane Street, Sadiq Jaffer Opsian and OCaml Labs, Tom Kelly OCaml Labs, Anmol Sahoo IIT Madras, Sudha Parimala IIT Madras, Atul Dhiman IIT Madras, Anil Madhavapeddy OCaml Labs DOI Media Attached | ||
16:15 15mTalk | Liquid Information Flow ControlDistinguished Paper ICFP Program Nadia Polikarpova University of California, San Diego, Deian Stefan University of California at San Diego, USA, Jean Yang Carnegie Mellon University, Shachar Itzhaky Technion, Israel, Travis Hance Carnegie Mellon University, Armando Solar-Lezama Massachusetts Institute of Technology, USA DOI Media Attached |
Tue 25 AugDisplayed time zone: Eastern Time (US & Canada) change
02:30 - 04:30 | |||
02:30 15mTalk | Achieving High-Performance the Functional Way - A Functional Pearl on Expressing High-Performance Optimizations as Rewrite Strategies ICFP Program Bastian Hagedorn University of Münster, Germany, Johannes Lenfers University of Münster, Thomas Koehler University of Glasgow, United Kingdom, Xueying Qin University of Glasgow, United Kingdom, Sergei Gorlatch University of Münster, Germany, Michel Steuwer The University of Edinburgh DOI Media Attached | ||
02:45 15mTalk | Staged Selective Parser Combinators ICFP Program Jamie Willis Imperial College London, Nicolas Wu Imperial College London, UK, Matthew Pickering University of Bristol, UK DOI Media Attached | ||
03:00 15mTalk | Kindly Bent to Free Us ICFP Program Gabriel Radanne Inria, Hannes Saffrich University of Freiburg, Peter Thiemann University of Freiburg, Germany DOI Pre-print Media Attached File Attached | ||
03:15 15mTalk | Sealing Pointer-Based Optimizations Behind Pure Functions ICFP Program Daniel Selsam Microsoft Research, Simon Hudon Carnegie Mellon University, Leonardo de Moura Microsoft Research, n.n. DOI Media Attached | ||
03:30 15mTalk | Effects for Efficiency: Asymptotic Speedup with First-Class Control ICFP Program Daniel Hillerström The University of Edinburgh, Sam Lindley Heriot-Watt University, UK / The University of Edinburgh, UK, John Longley The University of Edinburgh DOI Media Attached | ||
03:45 15mTalk | Computation Focusing ICFP Program DOI Media Attached | ||
04:00 15mTalk | Retrofitting Parallelism onto OCamlDistinguished Paper ICFP Program KC Sivaramakrishnan IIT Madras, Stephen Dolan University of Cambridge, UK, Leo White Jane Street, Sadiq Jaffer Opsian and OCaml Labs, Tom Kelly OCaml Labs, Anmol Sahoo IIT Madras, Sudha Parimala IIT Madras, Atul Dhiman IIT Madras, Anil Madhavapeddy OCaml Labs DOI Media Attached | ||
04:15 15mTalk | Liquid Information Flow ControlDistinguished Paper ICFP Program Nadia Polikarpova University of California, San Diego, Deian Stefan University of California at San Diego, USA, Jean Yang Carnegie Mellon University, Shachar Itzhaky Technion, Israel, Travis Hance Carnegie Mellon University, Armando Solar-Lezama Massachusetts Institute of Technology, USA DOI Media Attached |