Automatic Differentiation for Adjoint Stencil Loops

07/05/2019
by   Jan Hückelheim, et al.
0

Stencil loops are a common motif in computations including convolutional neural networks, structured-mesh solvers for partial differential equations, and image processing. Stencil loops are easy to parallelise, and their fast execution is aided by compilers, libraries, and domain-specific languages. Reverse-mode automatic differentiation, also known as algorithmic differentiation, autodiff, adjoint differentiation, or back-propagation, is sometimes used to obtain gradients of programs that contain stencil loops. Unfortunately, conventional automatic differentiation results in a memory access pattern that is not stencil-like and not easily parallelisable. In this paper we present a novel combination of automatic differentiation and loop transformations that preserves the structure and memory access pattern of stencil loops, while computing fully consistent derivatives. The generated loops can be parallelised and optimised for performance in the same way and using the same tools as the original computation. We have implemented this new technique in the Python tool PerforAD, which we release with this paper along with test cases derived from seismic imaging and computational fluid dynamics applications.

READ FULL TEXT

page 1

page 5

research
11/02/2021

Source-to-Source Automatic Differentiation of OpenMP Parallel Loops

This paper presents our work toward correct and efficient automatic diff...
research
02/06/2021

FastAD: Expression Template-Based C++ Library for Fast and Memory-Efficient Automatic Differentiation

Automatic differentiation is a set of techniques to efficiently and accu...
research
06/20/2016

Benchmarking Python Tools for Automatic Differentiation

In this paper we compare several Python tools for automatic differentiat...
research
06/23/2020

Index handling and assign optimization for Algorithmic Differentiation reuse index managers

For operator overloading Algorithmic Differentiation tools, the identifi...
research
03/07/2017

Mini-symposium on automatic differentiation and its applications in the financial industry

Automatic differentiation is involved for long in applied mathematics as...
research
07/09/2020

ACORNS: An Easy-To-Use Code Generator for Gradients and Hessians

The computation of first and second-order derivatives is a staple in man...
research
03/12/2018

Algorithmic Differentiation for Domain Specific Languages

Algorithmic Differentiation (AD) can be used to automate the generation ...

Please sign up or login with your details

Forgot password? Click here to reset