Clad — Automatic Differentiation Using Clang and LLVM

Clad — Automatic Differentiation Using Clang and LLVM
复制标题

Clad — 使用 Clang 和 LLVM 自动微分

DOI:
10.1088/1742-6596/608/1/012055
复制
发表时间:
2015
期刊:
Journal of Physics: Conference Series
影响因子:
--
通讯作者:
V. Ilieva
V. Ilieva
中科院分区:
--
文献类型:
--
作者:
V. Vassilev;M. Vassilev;A. Penev;L. Moneta;V. Ilieva

文献摘要

被引文献

相似文献

微分在高能物理中普遍存在,例如在最小化算法和统计分析中,在探测器对准和校准中,以及在理论上。自动微分(AD)通过转换函数的源代码,避免了符号和数值微分在舍入和速度方面的众所周知的限制。我们将介绍AD如何用于计算多元函数和函子对象的梯度。我们将解释实现AD工具的方法。我们将展示LLVM、Clang和CLING(根的C++11解释器)如何简化此类工具的创建。我们描述了如何将该工具集成到任何框架中。我们将演示一个简单的概念验证原型,称为CLAD,它能够生成C++函数和其他语言构造的n阶导数。我们还演示了CLAD如何使用OpenCL将繁琐的计算从CPU中分流出来。
Differentiation is ubiquitous in high energy physics, for instance in minimization algorithms and statistical analysis, in detector alignment and calibration, and in theory. Automatic differentiation (AD) avoids well-known limitations in round-offs and speed, which symbolic and numerical differentiation suffer from, by transforming the source code of functions. We will present how AD can be used to compute the gradient of multi-variate functions and functor objects. We will explain approaches to implement an AD tool. We will show how LLVM, Clang and Cling (ROOT's C++11 interpreter) simplifies creation of such a tool. We describe how the tool could be integrated within any framework. We will demonstrate a simple proof-of-concept prototype, called Clad, which is able to generate n-th order derivatives of C++ functions and other language constructs. We also demonstrate how Clad can offload laborious computations from the CPU using OpenCL.