论文标题

反向模式的自动差异化编译程序

Reverse-Mode Automatic Differentiation of Compiled Programs

论文作者

Aehle, Max, Blühdorn, Johannes, Sagebaum, Max, Gauger, Nicolas R.

论文摘要

算法分化的工具(AD)提供了用于使用计算机实施功能的精确导数。 g。,优化和机器学习(ML)。但是,他们通常需要该功能的源代码以一组限制的编程语言可用。为了使具有跨语言或封闭源组件的代码库访问AD的一步,我们最近介绍了前向模式AD Tool derivgrind。它使用Valgrind动态二进制仪器框架将前向模式AD逻辑插入编译程序的机器代码中。这项工作扩展了衍生产品,增加了记录真实评估树的功能,从而使运算符为编译程序的过载样式反向模式AD。我们维持了针对衍生物的正向模式报告的高度正确性,出于相同的理解原因,在广泛的测试套件中失败了相同的测试柜。在运行时,录制将汇编的64位基准程序的执行减速约为180。

Tools for algorithmic differentiation (AD) provide accurate derivatives of computer-implemented functions for use in, e. g., optimization and machine learning (ML). However, they often require the source code of the function to be available in a restricted set of programming languages. As a step towards making AD accessible for code bases with cross-language or closed-source components, we recently presented the forward-mode AD tool Derivgrind. It inserts forward-mode AD logic into the machine code of a compiled program using the Valgrind dynamic binary instrumentation framework. This work extends Derivgrind, adding the capability to record the real-arithmetic evaluation tree, and thus enabling operator overloading style reverse-mode AD for compiled programs. We maintain the high level of correctness reported for Derivgrind's forward mode, failing the same few testcases in an extensive test suite for the same well-understood reasons. Runtime-wise, the recording slows down the execution of a compiled 64-bit benchmark program by a factor of about 180.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源