Parallel Block-Delayed Sequences

Sam Westrick, Mike Rainey, Daniel Anderson, Guy E. Blelloch

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Programming languages using functions on collections of values, such as map, reduce, scan and filter, have been used for over fifty years. Such collections have proven to be particularly useful in the context of parallelism because such functions are naturally parallel. However, if implemented naively they lead to the generation of temporary intermediate collections that can significantly increase memory usage and runtime. To avoid this pitfall, many approaches use "fusion"to combine operations and avoid temporary results. However, most of these approaches involve significant changes to a compiler and are limited to a small set of functions, such as maps and reduces. In this paper we present a library-based approach that fuses widely used operations such as scans, filters, and flattens. In conjunction with existing techniques, this covers most of the common operations on collections. Our approach is based on a novel technique which parallelizes over blocks, with streams within each block. We demonstrate the approach by implementing libraries targeting multicore parallelism in two languages: Parallel ML and C++, which have very different semantics and compilers. To help users understand when to use the approach, we define a cost semantics that indicates when fusion occurs and how it reduces memory allocations. We present experimental results for a dozen benchmarks that demonstrate significant reductions in both time and space. In most cases the approach generates code that is near optimal for the machines it is running on.

Original languageEnglish (US)
Title of host publicationPPoPP 2022 - Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
PublisherAssociation for Computing Machinery
Pages61-75
Number of pages15
ISBN (Electronic)9781450392044
DOIs
StatePublished - Apr 2 2022
Event27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2022 - Virtual, Online, Korea, Republic of
Duration: Apr 2 2022Apr 6 2022

Publication series

NameProceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP

Conference

Conference27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2022
Country/TerritoryKorea, Republic of
CityVirtual, Online
Period4/2/224/6/22

Keywords

  • collections
  • functional programming
  • fusion
  • parallel programming

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Parallel Block-Delayed Sequences'. Together they form a unique fingerprint.

Cite this