Pattern discovery for parallelism in functional languages

No longer the preserve of specialist hardware, parallel devices are now ubiquitous. Pattern-based approaches to parallelism, such as algorithmic skeletons, simplify traditional low-level approaches by presenting composable high-level patterns of parallelism to the programmer. This allows optimal par...

Full description

Bibliographic Details
Main Author: Barwell, Adam David
Other Authors: Hammond, Kevin
Published: University of St Andrews 2018
Online Access:https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.750140
id ndltd-bl.uk-oai-ethos.bl.uk-750140
record_format oai_dc
spelling ndltd-bl.uk-oai-ethos.bl.uk-7501402019-01-08T03:27:30ZPattern discovery for parallelism in functional languagesBarwell, Adam DavidHammond, Kevin2018No longer the preserve of specialist hardware, parallel devices are now ubiquitous. Pattern-based approaches to parallelism, such as algorithmic skeletons, simplify traditional low-level approaches by presenting composable high-level patterns of parallelism to the programmer. This allows optimal parallel configurations to be derived automatically, and facilitates the use of different parallel architectures. Moreover, parallel patterns can be swap-replaced for sequential recursion schemes, thus simplifying their introduction. Unfortunately, there is no guarantee that recursion schemes are present in all functional programs. Automatic pattern discovery techniques can be used to discover recursion schemes. Current approaches are limited by both the range of analysable functions, and by the range of discoverable patterns. In this thesis, we present an approach based on program slicing techniques that facilitates the analysis of a wider range of explicitly recursive functions. We then present an approach using anti-unification that expands the range of discoverable patterns. In particular, this approach is user-extensible; i.e. patterns developed by the programmer can be discovered without significant effort. We present prototype implementations of both approaches, and evaluate them on a range of examples, including five parallel benchmarks and functions from the Haskell Prelude. We achieve maximum speedups of 32.93x on our 28-core hyperthreaded experimental machine for our parallel benchmarks, demonstrating that our approaches can discover patterns that produce good parallel speedups. Together, the approaches presented in this thesis enable the discovery of more loci of potential parallelism in pure functional programs than currently possible. This leads to more possibilities for parallelism, and so more possibilities to take advantage of the potential performance gains that heterogeneous parallel systems present.University of St Andrewshttps://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.750140http://hdl.handle.net/10023/15641Electronic Thesis or Dissertation
collection NDLTD
sources NDLTD
description No longer the preserve of specialist hardware, parallel devices are now ubiquitous. Pattern-based approaches to parallelism, such as algorithmic skeletons, simplify traditional low-level approaches by presenting composable high-level patterns of parallelism to the programmer. This allows optimal parallel configurations to be derived automatically, and facilitates the use of different parallel architectures. Moreover, parallel patterns can be swap-replaced for sequential recursion schemes, thus simplifying their introduction. Unfortunately, there is no guarantee that recursion schemes are present in all functional programs. Automatic pattern discovery techniques can be used to discover recursion schemes. Current approaches are limited by both the range of analysable functions, and by the range of discoverable patterns. In this thesis, we present an approach based on program slicing techniques that facilitates the analysis of a wider range of explicitly recursive functions. We then present an approach using anti-unification that expands the range of discoverable patterns. In particular, this approach is user-extensible; i.e. patterns developed by the programmer can be discovered without significant effort. We present prototype implementations of both approaches, and evaluate them on a range of examples, including five parallel benchmarks and functions from the Haskell Prelude. We achieve maximum speedups of 32.93x on our 28-core hyperthreaded experimental machine for our parallel benchmarks, demonstrating that our approaches can discover patterns that produce good parallel speedups. Together, the approaches presented in this thesis enable the discovery of more loci of potential parallelism in pure functional programs than currently possible. This leads to more possibilities for parallelism, and so more possibilities to take advantage of the potential performance gains that heterogeneous parallel systems present.
author2 Hammond, Kevin
author_facet Hammond, Kevin
Barwell, Adam David
author Barwell, Adam David
spellingShingle Barwell, Adam David
Pattern discovery for parallelism in functional languages
author_sort Barwell, Adam David
title Pattern discovery for parallelism in functional languages
title_short Pattern discovery for parallelism in functional languages
title_full Pattern discovery for parallelism in functional languages
title_fullStr Pattern discovery for parallelism in functional languages
title_full_unstemmed Pattern discovery for parallelism in functional languages
title_sort pattern discovery for parallelism in functional languages
publisher University of St Andrews
publishDate 2018
url https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.750140
work_keys_str_mv AT barwelladamdavid patterndiscoveryforparallelisminfunctionallanguages
_version_ 1718808312994070528