scholarly journals Reverse-mode automatic differentiation and optimization of GPU kernels via enzyme

2021 ◽  
Author(s):  
William S. Moses ◽  
Valentin Churavy ◽  
Ludger Paehler ◽  
Jan Hückelheim ◽  
Sri Hari Krishna Narayanan ◽  
...  
Author(s):  
Wei Zhang ◽  
Dingxi Wang ◽  
Xiuquan Huang ◽  
Tianxiao Yang ◽  
Hong Yan ◽  
...  

The linear and nonlinear harmonic methods are efficient frequency domain methods for analyzing time periodic unsteady flow fields. They have been widely used in both academia and industry. But the cost and complexity of developing a linear harmonic solver has been limiting its wider applications. On the other hand, the automatic differentiation (AD) has long been used in the CFD community with a focus on generating adjoint codes in a reverse mode. All those AD tools can do a much better job in generating linearized codes in a tangent mode, but so far very little, if any, attention is paid to using AD for developing linear harmonic solvers. The linear harmonic method, in comparison with the harmonic balance method, has its own advantages. For example, it can capture small disturbances very effectively, and avoids aliasing errors which can lead to solution instability since each wave component is solved for separately. This paper presents the effort of using an AD tool to generate major source codes for the development of a linear harmonic solver for analyzing time periodic unsteady flows. It includes the procedures and advice of using AD for such a purpose. A case study is also presented to validate the developed linear harmonic solver.


Author(s):  
Johannes Blühdorn ◽  
Nicolas R. Gauger ◽  
Matthias Kabel

AbstractWe propose a universal method for the evaluation of generalized standard materials that greatly simplifies the material law implementation process. By means of automatic differentiation and a numerical integration scheme, AutoMat reduces the implementation effort to two potential functions. By moving AutoMat to the GPU, we close the performance gap to conventional evaluation routines and demonstrate in detail that the expression level reverse mode of automatic differentiation as well as its extension to second order derivatives can be applied inside CUDA kernels. We underline the effectiveness and the applicability of AutoMat by integrating it into the FFT-based homogenization scheme of Moulinec and Suquet and discuss the benefits of using AutoMat with respect to runtime and solution accuracy for an elasto-viscoplastic example.


2005 ◽  
Vol 21 (8) ◽  
pp. 1401-1417 ◽  
Author(s):  
Laurent Hascoët ◽  
Uwe Naumann ◽  
Valérie Pascual

2021 ◽  
Vol 1 (3) ◽  
pp. 126-134
Author(s):  
Yan Yang ◽  
Angela F. Gao ◽  
Jorge C. Castellanos ◽  
Zachary E. Ross ◽  
Kamyar Azizzadenesheli ◽  
...  

Abstract Seismic wave propagation forms the basis for most aspects of seismological research, yet solving the wave equation is a major computational burden that inhibits the progress of research. This is exacerbated by the fact that new simulations must be performed whenever the velocity structure or source location is perturbed. Here, we explore a prototype framework for learning general solutions using a recently developed machine learning paradigm called neural operator. A trained neural operator can compute a solution in negligible time for any velocity structure or source location. We develop a scheme to train neural operators on an ensemble of simulations performed with random velocity models and source locations. As neural operators are grid free, it is possible to evaluate solutions on higher resolution velocity models than trained on, providing additional computational efficiency. We illustrate the method with the 2D acoustic wave equation and demonstrate the method’s applicability to seismic tomography, using reverse-mode automatic differentiation to compute gradients of the wavefield with respect to the velocity structure. The developed procedure is nearly an order of magnitude faster than using conventional numerical methods for full waveform inversion.


Sign in / Sign up

Export Citation Format

Share Document