当前位置:
X-MOL 学术
›
arXiv.cs.MS
›
论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
FastAD: Expression Template-Based C++ Library for Fast and Memory-Efficient Automatic Differentiation
arXiv - CS - Mathematical Software Pub Date : 2021-02-06 , DOI: arxiv-2102.03681 James Yang
arXiv - CS - Mathematical Software Pub Date : 2021-02-06 , DOI: arxiv-2102.03681 James Yang
Automatic differentiation is a set of techniques to efficiently and
accurately compute the derivative of a function represented by a computer
program. Existing C++ libraries for automatic differentiation (e.g. Adept, Stan
Math Library), however, exhibit large memory consumptions and runtime
performance issues. This paper introduces FastAD, a new C++ template library
for automatic differentiation, that overcomes all of these challenges in
existing libraries by using vectorization, simpler memory management using a
fully expression-template-based design, and other compile-time optimizations to
remove some run-time overhead. Benchmarks show that FastAD performs 2-10 times
faster than Adept and 2-19 times faster than Stan across various test cases
including a few real-world examples.
中文翻译:
FastAD:基于表达式模板的C ++库,可实现快速且内存高效的自动区分
自动微分是一组技术,可有效,准确地计算由计算机程序表示的函数的导数。但是,现有的用于自动微分的C ++库(例如Adept,Stan Math库)存在大量内存消耗和运行时性能问题。本文介绍了FastAD,这是一种用于自动区分的新C ++模板库,它通过使用矢量化,使用基于完全表达式模板的设计进行更简单的内存管理以及其他编译时优化来消除某些运行,从而克服了现有库中的所有这些挑战。时间开销。基准测试表明,在各种测试用例(包括一些实际示例)中,FastAD的性能比Adept快2-10倍,比Stan快2-19倍。
更新日期:2021-02-09
中文翻译:
FastAD:基于表达式模板的C ++库,可实现快速且内存高效的自动区分
自动微分是一组技术,可有效,准确地计算由计算机程序表示的函数的导数。但是,现有的用于自动微分的C ++库(例如Adept,Stan Math库)存在大量内存消耗和运行时性能问题。本文介绍了FastAD,这是一种用于自动区分的新C ++模板库,它通过使用矢量化,使用基于完全表达式模板的设计进行更简单的内存管理以及其他编译时优化来消除某些运行,从而克服了现有库中的所有这些挑战。时间开销。基准测试表明,在各种测试用例(包括一些实际示例)中,FastAD的性能比Adept快2-10倍,比Stan快2-19倍。