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

02/06/2021
by   James Yang, et al.
0

Automatic differentiation is a set of techniques to efficiently and accurately compute the derivative of a function represented by a computer program. Existing C++ libraries for automatic differentiation (e.g. Adept, Stan Math Library), however, exhibit large memory consumptions and runtime performance issues. This paper introduces FastAD, a new C++ template library for automatic differentiation, that overcomes all of these challenges in existing libraries by using vectorization, simpler memory management using a fully expression-template-based design, and other compile-time optimizations to remove some run-time overhead. Benchmarks show that FastAD performs 2-10 times faster than Adept and 2-19 times faster than Stan across various test cases including a few real-world examples.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2019

Automatic Differentiation for Adjoint Stencil Loops

Stencil loops are a common motif in computations including convolutional...
research
06/28/2023

FuzzyFlow: Leveraging Dataflow To Find and Squash Program Optimization Bugs

The current hardware landscape and application scale is driving performa...
research
05/04/2018

Manifold Geometry with Fast Automatic Derivatives and Coordinate Frame Semantics Checking in C++

Computer vision and robotics problems often require representation and e...
research
04/01/2021

Fast Jacobian-Vector Product for Deep Networks

Jacobian-vector products (JVPs) form the backbone of many recent develop...
research
04/24/2018

Automatic generation of CUDA code performing tensor manipulations using C++ expression templates

We present a C++ library, TLoops, which uses a hierarchy of expression t...
research
11/12/2018

A Review of automatic differentiation and its efficient implementation

Derivatives play a critical role in computational statistics, examples b...
research
05/04/2017

Compile-Time Symbolic Differentiation Using C++ Expression Templates

Template metaprogramming is a popular technique for implementing compile...

Please sign up or login with your details

Forgot password? Click here to reset