Skip to main navigation Skip to search Skip to main content

Reverse-Mode AD of Multi-Reduce and Scan in Futhark

Lotte Maria Bruun, Ulrik Stuhr Larsen, Nikolaj Hey Hinnerskov, Cosmin Eugen Oancea

Research output: Chapter in Book/Report/Conference proceedingArticle in proceedingsResearchpeer-review

1 Citation (Scopus)
82 Downloads (Pure)

Abstract

We present and evaluate the Futhark implementation of reverse-mode automatic differentiation (AD) for the basic blocks of parallel programming: reduce, prefix sum (scan), and reduce-by-index (multi-reduce). We present derivations of general-case algorithms, and then discuss several specializations that result in efficient differentiation of most cases of practical interest. We report an experiment that evaluates the GPU performance of the differentiated code and highlights the impact of the proposed specializations as well as the strengths and weaknesses of differentiating at high level bulk-parallel operators vs "differentiating the memory", i.e., low-level implementations that access/update individual array elements.

Original languageEnglish
Title of host publicationProceedings of the 2023 35th Symposium on Implementation and Application of Functional Languages, IFL 2023
PublisherAssociation for Computing Machinery
Publication date2023
Pages1-14
Article number14
ISBN (Electronic)9798400716317
DOIs
Publication statusPublished - 2023
Event35th Symposium on Implementation and Application of Functional Languages, IFL 2023 - Braga, Portugal
Duration: 29 Aug 202331 Aug 2023

Conference

Conference35th Symposium on Implementation and Application of Functional Languages, IFL 2023
Country/TerritoryPortugal
CityBraga
Period29/08/202331/08/2023

Bibliographical note

Publisher Copyright:
© 2023 ACM.

Cite this