伴随Stenosis环的自动微分
Automatic Differentiation for Adjoint Stencil Loops
摘要:
在包括卷积神经网络、用于偏微分方程的结构化网格求解器和图像处理的计算中,血管造影环是常见的主题。Stenchmark循环很容易并行化,它们的快速执行是由编译器,库和特定领域的语言帮助的。反向模式自动微分,也称为算法微分、autodiff、伴随微分或反向传播,有时用于获得包含模板循环的程序的梯度。不幸的是,传统的自动微分导致存储器访问模式不是模板式的并且不容易并行化。在本文中,我们提出了一种新的组合的自动微分和循环变换,保留模板循环的结构和内存访问模式,同时计算完全一致的衍生物。生成的循环可以并行化,并以相同的方式优化性能,并使用与原始计算相同的工具。我们已经在Python工具PerforAD中实现了这项新技术,我们将与本文一起发布来自地震成像和计算流体动力学应用程序的测试用例。
英文摘要:
Stencil loops are a common motif in computations including convolutional neural networks, structured-mesh solvers for partial differential equations, and image processing. Stencil loops are easy to parallelise, and their fast execution is aided by compilers, libraries, and domain-specific languages. Reverse-mode automatic differentiation, also known as algorithmic differentiation, autodiff, adjoint differentiation, or back-propagation, is sometimes used to obtain gradients of programs that contain stencil loops. Unfortunately, conventional automatic differentiation results in a memory access pattern that is not stencil-like and not easily parallelisable. In this paper we present a novel combination of automatic differentiation and loop transformations that preserves the structure and memory access pattern of stencil loops, while computing fully consistent derivatives. The generated loops can be parallelised and optimised for performance in the same way and using the same tools as the original computation. We have implemented this new technique in the Python tool PerforAD, which we release with this paper along with test cases derived from seismic imaging and computational fluid dynamics applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。