Algorithmic differentiation for domain specific languages in C++ with expression templates
Max Sagebaum, Nicolas R. Gauger

TL;DR
This paper introduces a novel algorithmic differentiation approach for C++ domain-specific languages that preserves memory structure and leverages domain operations for improved performance.
Contribution
A new AD tool tailored for domain-specific languages in C++ that maintains primal data structure and enhances optimization capabilities.
Findings
Performance comparable to specialized AD tools.
Run-time factor below reverse AD theoretical limit.
Effective handling of linear algebra operations.
Abstract
The application of operator overloading algorithmic differentiation (AD) to computer programs in order to compute the derivative is quite common. But, the replacement of the underlying computational floating point type with the specialized type of an AD tool has two problems. First, the memory structure of the program is changed and floating-point data is interleaved with identifiers from AD. This prevents the compiler from performing optimizations such as SIMD optimizations. Second, the AD tool does not see any domain-specific operations, e.,g. linear algebra operations, that the program uses. This prevents the AD tool from using specialized algorithms in such places. We propose a new AD tool that is tailored to such situations. The memory structure of the primal data is retained by associating an identifier with each entity, e.,g. matrix, and not with each floating point value, e.,g.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNumerical Methods and Algorithms · Embedded Systems Design Techniques · Logic, programming, and type systems
