@inproceedings {futhark/sc22ad, author = {R. Schenck and O. Rønning and T. Henriksen and C. E. Oancea}, booktitle = {2022 SC22: International Conference for High Performance Computing, Networking, Storage and Analysis (SC) (SC)}, title = {AD for an Array Language with Nested Parallelism}, year = {2022}, volume = {}, issn = {2167-4337}, pages = {829-843}, abstract = {We present a technique for applying reverse mode automatic differentiation (AD) on a non-recursive second-order functional array language that supports nested parallelism and is primarily aimed at efficient GPU execution. The key idea is to eliminate the need for a tape by relying on redundant execution to bring into each new scope all program variables that may be needed by the differentiated code. Efficient execution is enabled by the observation that perfectly nested scopes do not introduce re-execution and that such perfect nests can be readily produced by application of known compiler transformations. Our technique differentiates loops and bulk-parallel operators—e.g., map, reduce(-by-index), scan, and scatter—by specific rewrite rules and aggressively optimizes the resulting nested-parallel code. We report an evaluation that compares with established AD solutions and demonstrates competitive performance on ten common benchmarks from recent applied AD literature.}, keywords = {automatic differentiation;functional data parallel language;compilers;gpgpu}, doi = {}, url = {https://doi.ieeecomputersociety.org/}, publisher = {IEEE Computer Society}, address = {Los Alamitos, CA, USA}, month = {nov} }