Programming language features, usage patterns, and the efficiency of generated adjoint code

被引:5
|
作者
Hascoet, Laurent [1 ]
Utke, Jean [2 ]
机构
[1] INRIA Sophia Antipolis, Team Ecuador, Sophia Antipolis, France
[2] Allstate Insurance Co, Northbrook, IL USA
关键词
algorithmic differentiation; automatic differentiation; adjoint computation; source transformation; DIFFERENTIATION; REVERSE;
D O I
10.1080/10556788.2016.1146269
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The computation of gradients via the reverse mode of algorithmic differentiation is a valuable technique in modelling many science and engineering applications. This technique is particularly efficient when implemented as a source transformation, as it may use static data-flow analysis. However, some features of the major programming languages are detrimental to the efficiency of the transformed source code. This paper provides an overview of the most common problem scenarios and estimates the cost overhead incurred by using the respective language feature or employing certain common patterns. An understanding of these topics is crucial for the efficiency or even feasibility of adjoint computations, particularly for large-scale numerical simulations, for example, in geosciences. While one cannot hope to cover all effects observable with a given programming language in a given run time environment, the paper aims at providing a reasonable guide for the users of C/C++ and Fortran source transformation tools for algorithmic differentiation.
引用
收藏
页码:885 / 903
页数:19
相关论文
共 1 条
  • [1] Adjoint Code Design Patterns
    Naumann, Uwe
    ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2019, 45 (03):