TU Darmstadt / ULB / TUbiblio

The impact of dynamic data reshaping on adjoint code generation for weakly-typed languages such as Matlab

Willkomm, J. ; Bischof, Christian ; Bücker, H. M.
Hrsg.: Forth, Shaun ; Hovland, Paul D. ; Phipps, Eric ; Utke, Jean ; Walther, Andrea (2012)
The impact of dynamic data reshaping on adjoint code generation for weakly-typed languages such as Matlab.
In: Recent Advances in Automatic Differentiation
Buchkapitel, Bibliographie

Kurzbeschreibung (Abstract)

Productivity-oriented programming languages typically emphasize convenience over syntactic rigor. A well-known example is Matlab, which employs a weak type system to allow the user to assign arbitrary types and shapes to a variable, and it provides various shortcuts in programming that result in implicit data reshapings. Examples are scalar expansion, where a scalar is implicitly expanded to a matrix of the appropriate size filled with copies of the scalar value, the use of row vectors in place of column vectors and vice versa, and the automatic expansion of arrays when indices outside of the previously allocated range are referenced. These features need to be addressed at runtime when generating adjoint code, as Matlab does not provide required information about types, shapes and conversions at compile time. This fact, and the greater scope of reshaping possible, is a main distinguishing feature of Matlab compared to traditional programming languages, some of which, e.g. Fortran 90, also support vector expressions. In this paper, in the context of the AdiMAT source transformation tool for Matlab, we develop techniques generally applicable for adjoint code generation in the face of dynamic data reshapings occurring both on the left- and right-hand side of assignments. Experiments show that in this fashion correct adjoint code can be generated also for very dynamic language scenarios at moderate additional cost.

Typ des Eintrags: Buchkapitel
Erschienen: 2012
Herausgeber: Forth, Shaun ; Hovland, Paul D. ; Phipps, Eric ; Utke, Jean ; Walther, Andrea
Autor(en): Willkomm, J. ; Bischof, Christian ; Bücker, H. M.
Art des Eintrags: Bibliographie
Titel: The impact of dynamic data reshaping on adjoint code generation for weakly-typed languages such as Matlab
Sprache: Englisch
Publikationsjahr: 2012
Ort: Berlin
Verlag: Springer
Buchtitel: Recent Advances in Automatic Differentiation
Reihe: Lecture Notes in Computational Science and Engineering
Band einer Reihe: 87
Kurzbeschreibung (Abstract):

Productivity-oriented programming languages typically emphasize convenience over syntactic rigor. A well-known example is Matlab, which employs a weak type system to allow the user to assign arbitrary types and shapes to a variable, and it provides various shortcuts in programming that result in implicit data reshapings. Examples are scalar expansion, where a scalar is implicitly expanded to a matrix of the appropriate size filled with copies of the scalar value, the use of row vectors in place of column vectors and vice versa, and the automatic expansion of arrays when indices outside of the previously allocated range are referenced. These features need to be addressed at runtime when generating adjoint code, as Matlab does not provide required information about types, shapes and conversions at compile time. This fact, and the greater scope of reshaping possible, is a main distinguishing feature of Matlab compared to traditional programming languages, some of which, e.g. Fortran 90, also support vector expressions. In this paper, in the context of the AdiMAT source transformation tool for Matlab, we develop techniques generally applicable for adjoint code generation in the face of dynamic data reshapings occurring both on the left- and right-hand side of assignments. Experiments show that in this fashion correct adjoint code can be generated also for very dynamic language scenarios at moderate additional cost.

Freie Schlagworte: Reverse mode, adjoint code, dynamic data reshaping, scalar expansion, weakly-typed languages, Matlab, ADiMat, source transformation
Fachbereich(e)/-gebiet(e): 20 Fachbereich Informatik
20 Fachbereich Informatik > Scientific Computing
Hinterlegungsdatum: 16 Mai 2013 11:27
Letzte Änderung: 07 Jan 2021 09:50
PPN:
Export:
Suche nach Titel in: TUfind oder in Google
Frage zum Eintrag Frage zum Eintrag

Optionen (nur für Redakteure)
Redaktionelle Details anzeigen Redaktionelle Details anzeigen