ad-dualrev-th

Implementation of dual-numbers reverse AD with TemplateHaskell

MIT License

Stars
4
Committers
1

Parallel dual-numbers reverse AD using Template Haskell

Documentation has been rendered here.

This is an implementation of the algorithm described in our paper at POPL '23 (with appendices), extended with basic support for task parallelism as described in an extended version submitted for publication in JFP. The sequential algorithm is what you get if you take standard dual-numbers reverse AD as described e.g. by Brunel et al. (2019) and Huot et al. (2020, §6), as well as in Fig. 6 of our paper, and optimise it to be efficient. For details on how exactly these code transformations look and what the reasoning behind them is, we refer to our paper.

The non-parallel version of the implementation submitted as artifact for the POPL '23 paper can be found at this commit.