Cache-Aware and Roofline-Ideal Automatic Differentiation

2021 ◽  
Author(s):  
Yuxuan Jing ◽  
Rami M. Younis

Abstract Automatic differentiation software libraries augment arithmetic operations with their derivatives, thereby relieving the programmer of deriving, implementing, debugging, and maintaining derivative code. With this encapsulation however, the responsibility of code optimization relies more heavily on the AD system itself (as opposed to the programmer and the compiler). Moreover, given that there are multiple contexts in reservoir simulation software for which derivatives are required (e.g. property package and discrete operator evaluations), the AD infrastructure must also be adaptable. An Operator Overloading AD design is proposed and tested to provide scalability and computational efficiency seemlessly across memory- and compute-bound applications. This is achieved by 1) use of portable and standard programming language constructs (C++17 and OpenMP 4.5 standards), 2) adopting a vectorized programming interface, 3) lazy evaluation via expression templates, and 4) multiple memory alignment and layout policies. Empirical analysis is conducted on various kernels spanning various arithmetic intensity and working set sizes. Cache- aware roofline analysis results show that the performance and scalability attained are reliably ideal. In terms of floapting point operations executed per second, the performance of the AD system matches optimized hand-code. Finally, the implementation is benchmarked using the Automatically Differentiable Expression Templates Library (ADETL).

2006 ◽  
Vol 14 (2) ◽  
pp. 81-110 ◽  
Author(s):  
Christophe Prud'homme

In this article, we present a domain specific embedded language inC++ that can be used in various contexts such as numerical projection onto a functional space, numerical integration, variational formulations and automatic differentiation. Albeit these tools operate in different ways, the language overcomes this difficulty by decoupling expression constructions from evaluation. The language is implemented using expression templates and meta-programming techniques and uses various Boost libraries. The language is exercised on a number of non-trivial examples and a benchmark presents the performance behavior on a few test problems.


2017 ◽  
Author(s):  
Jacob Huth ◽  
Timothée Masquelier ◽  
Angelo Arleo

1AbstractWe developed Convis, a Python simulation toolbox for large scale neural populations which offers arbitrary receptive fields by 3D convolutions executed on a graphics card. The resulting software proves to be flexible and easily extensible in Python, while building on the PyTorch library [32], which was previously used successfully in deep learning applications, for just-in-time optimization and compilation of the model onto CPU or GPU architectures. An alternative implementation based on Theano [33] is also available, although not fully supported.Through automatic differentiation, any parameter of a specified model can be optimized to approach a desired output which is a significant improvement over e.g. Monte Carlo or particle optimizations without gradients. We show that a number of models including even complex non-linearities such as contrast gain control and spiking mechanisms can be implemented easily.We show in this paper that we can in particular recreate the simulation results of a popular retina simulation software VirtualRetina [35], with the added benefit of providing (1) arbitrary linear filters instead of the product of Gaussian and exponential filters and (2) optimization routines utilizing the gradients of the model. We demonstrate the utility of 3d convolution filters with a simple direction selective filter. Also we show that it is possible to optimize the input for a certain goal, rather than the parameters, which can aid the design of experiments as well as closed-loop online stimulus generation. Yet, Convis is more than a retina simulator. For instance it can also predict the response of V1 orientation selective cells.Convis is open source under the GPL-3.0 license and available from https://github.com/jahuth/convis/ with documentation at https://jahuth.github.io/convis/.


2003 ◽  
Vol 11 (4) ◽  
pp. 263-272 ◽  
Author(s):  
Christian H. Bischof ◽  
H. Martin Bücker ◽  
Bruno Lang ◽  
Arno Rasch

Numerical simulation is a powerful tool in science and engineering, and it is also used for optimizing the design of products and experiments rather than only for reproducing the behavior of scientific and engineering systems. In order to reduce the number of simulation runs, the traditional "trial and error" approach for finding near-to-optimum design parameters is more and more replaced with efficient numerical optimization algorithms. Done by hand, the coupling of simulation and optimization software is tedious and error-prone. In this note we introduce a software environment called EFCOSS (Environment For Combining Optimization and Simulation Software) that facilitates and speeds up this task by doing much of the required work automatically. Our framework includes support for automatic differentiation providing the derivatives required by many optimization algorithms. We describe the process of integrating the widely used computational fluid dynamics package FLUENT and a MINPACK-1 least squares optimizer into EFCOSS and follow a sample session solving a data assimilation problem.


Author(s):  
Vishnu Sharma ◽  
Vijay Singh Rathore

In these days most of the software development uses preexisting software components. This approach provides plenty of benefits over the traditional development. Most of the software industries uses their own domain based software libraries where components resides in the form of modules, codes, executable file, documentations, test plans which may be used as it is or with minor changes. Due to shrinking time and high demand of software development it is necessary to use pre tested software components to ensure high functionality in software developed. Software components can be used very easily and without having the worries of errors and bugs because these are developed under expert supervision and well tested. What we have to do is just embed these components in our project. In this paper a survey got conducted over 112 software developer,testers and freelancers. In survey several issues in CBSD were identified. An efficient repository along with a component search engine is developed. All the component retrieval techniques were evaluated and compared with precise and recall method.


TAPPI Journal ◽  
2014 ◽  
Vol 13 (8) ◽  
pp. 65-78 ◽  
Author(s):  
W.B.A. (SANDY) SHARP ◽  
W.J. JIM FREDERICK ◽  
JAMES R. KEISER ◽  
DOUGLAS L. SINGBEIL

The efficiencies of biomass-fueled power plants are much lower than those of coal-fueled plants because they restrict their exit steam temperatures to inhibit fireside corrosion of superheater tubes. However, restricting the temperature of a given mass of steam produced by a biomass boiler decreases the amount of power that can be generated from this steam in the turbine generator. This paper examines the relationship between the temperature of superheated steam produced by a boiler and the quantity of power that it can generate. The thermodynamic basis for this relationship is presented, and the value of the additional power that could be generated by operating with higher superheated steam temperatures is estimated. Calculations are presented for five plants that produce both steam and power. Two are powered by black liquor recovery boilers and three by wood-fired boilers. Steam generation parameters for these plants were supplied by industrial partners. Calculations using thermodynamics-based plant simulation software show that the value of the increased power that could be generated in these units by increasing superheated steam temperatures 100°C above current operating conditions ranges between US$2,410,000 and US$11,180,000 per year. The costs and benefits of achieving higher superheated steam conditions in an individual boiler depend on local plant conditions and the price of power. However, the magnitude of the increased power that can be generated by increasing superheated steam temperatures is so great that it appears to justify the cost of corrosion-mitigation methods such as installing corrosion-resistant materials costing far more than current superheater alloys; redesigning biomassfueled boilers to remove the superheater from the flue gas path; or adding chemicals to remove corrosive constituents from the flue gas. The most economic pathways to higher steam temperatures will very likely involve combinations of these methods. Particularly attractive approaches include installing more corrosion-resistant alloys in the hottest superheater locations, and relocating the superheater from the flue gas path to an externally-fired location or to the loop seal of a circulating fluidized bed boiler.


TAPPI Journal ◽  
2009 ◽  
Vol 8 (1) ◽  
pp. 4-11
Author(s):  
MOHAMED CHBEL ◽  
LUC LAPERRIÈRE

Pulp and paper processes frequently present nonlinear behavior, which means that process dynam-ics change with the operating points. These nonlinearities can challenge process control. PID controllers are the most popular controllers because they are simple and robust. However, a fixed set of PID tuning parameters is gen-erally not sufficient to optimize control of the process. Problems related to nonlinearities such as sluggish or oscilla-tory response can arise in different operating regions. Gain scheduling is a potential solution. In processes with mul-tiple control objectives, the control strategy must further evaluate loop interactions to decide on the pairing of manipulated and controlled variables that minimize the effect of such interactions and hence, optimize controller’s performance and stability. Using the CADSIM Plus™ commercial simulation software, we developed a Jacobian sim-ulation module that enables automatic bumps on the manipulated variables to calculate process gains at different operating points. These gains can be used in controller tuning. The module also enables the control system designer to evaluate loop interactions in a multivariable control system by calculating the Relative Gain Array (RGA) matrix, of which the Jacobian is an essential part.


Sign in / Sign up

Export Citation Format

Share Document