Mixed-language automatic differentiation - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Article Dans Une Revue Optimization Methods and Software Année : 2018

Mixed-language automatic differentiation

Résumé

As Automatic Differentiation (AD) usage is spreading to larger and more sophisticated applications, problems arise for codes that use several programming languages. This work describes the issues involved in interoperability between languages and focuses on the main issue which is parameter passing. It describes the architecture of a source transformation AD tool and the algorithms used to differentiate mixed-language codes. A language-independent internal representation enables application of global analysis and strategies on the entire source code. Our goal is that the Tapenade AD tool differentiates codes that mix C and Fortran and generates efficient differentiated code using these strategies. Many Automatic Differentiation tools have been designed with one application language in mind. Only a few use an internal representation that promotes language-independence, at least conceptually. When faced with the problem of building (with AD) the derivative code of a mixed-language application, end-users may consider using several AD tools, one per language. However, this leads to several problems: • Different AD tools may implement very different AD concepts such as overloading-based versus source-transformation based transformations, or association-by-address versus association-by-name for storage of derivatives values. These concepts are generally not directly compatible. • When selecting the source-transformation concept (for efficiency of the differentiated code), performance of the differentiated code strongly depends on the quality of data-flow analysis, which is improved if it is global on the code. A global analysis with separate AD tools would require inter-tool communication at the level of data-flow analysis, which does not exist at present. It is possible to produce efficient derivative code for mixed-language applications using single-language AD tools by writing by hand dummy definitions of black-box procedures with the same data flow behavior. However, this method is prone to error and is tedious to apply for large mixed-language applications. It is also possible to automatically interface differentiated codes from different languages with a suitable high-level specification, for
Fichier principal
Vignette du fichier
mixedLanguageAD.pdf (257.67 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-01852216 , version 1 (01-08-2018)

Identifiants

Citer

Valérie Pascual, Laurent Hascoët. Mixed-language automatic differentiation. Optimization Methods and Software, 2018, 00, pp.1 - 15. ⟨10.1080/10556788.2018.1435650⟩. ⟨hal-01852216⟩
167 Consultations
234 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More