当前位置: 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.)
Event-Based Automatic Differentiation of OpenMP with OpDiLib
arXiv - CS - Mathematical Software Pub Date : 2021-02-23 , DOI: arxiv-2102.11572
Johannes Blühdorn, Max Sagebaum, Nicolas R. Gauger

We present the new software OpDiLib, a universal add-on for classical operator overloading AD tools that enables the automatic differentiation (AD) of OpenMP parallelized code. With it, we establish support for OpenMP features in a reverse mode operator overloading AD tool to an extent that was previously only reported on in source transformation tools. We achieve this with an event-based implementation ansatz that is unprecedented in AD. Combined with modern OpenMP features around OMPT, we demonstrate how it can be used to achieve differentiation without any additional modifications of the source code; neither do we impose a priori restrictions on the data access patterns, which makes OpDiLib highly applicable. For further performance optimizations, restrictions like atomic updates on the adjoint variables can be lifted in a fine-grained manner for any parts of the code. OpDiLib can also be applied in a semi-automatic fashion via a macro interface, which supports compilers that do not implement OMPT. In a detailed performance study, we demonstrate the applicability of OpDiLib for a pure operator overloading approach in a hybrid parallel environment. We quantify the cost of atomic updates on the adjoint vector and showcase the speedup and scaling that can be achieved with the different configurations of OpDiLib in both the forward and the reverse pass.

中文翻译:

使用OpDiLib的基于事件的OpenMP自动区分

我们展示了新软件OpDiLib,这是经典操作员重载AD工具的通用附件,可实现OpenMP并行化代码的自动区分(AD)。借助它,我们以反向模式运算符重载AD工具的方式建立了对OpenMP功能的支持,其程度以前仅在源转换工具中有所报道。我们通过基于事件的实施ansatz来实现这一目标,这在AD中是空前的。结合围绕OMPT的现代OpenMP功能,我们演示了如何在不进行任何其他源代码修改的情况下将其用于实现差异化;我们也没有对数据访问模式施加先验限制,这使OpDiLib高度适用。为了进一步优化性能,对于代码的任何部分,可以以细粒度的方式取消对伴随变量的原子更新之类的限制。还可以通过宏接口以半自动方式应用OpDiLib,该宏接口支持未实现OMPT的编译器。在详细的性能研究中,我们证明了OpDiLib在混合并行环境中用于纯运算符重载方法的适用性。我们量化了伴随向量上原子更新的成本,并展示了通过正向和反向通过OpDiLib的不同配置可以实现的加速和缩放。我们证明了OpDiLib在混合并行环境中用于纯运算符重载方法的适用性。我们量化了伴随向量上原子更新的成本,并展示了通过正向和反向通过OpDiLib的不同配置可以实现的加速和缩放。我们证明了OpDiLib在混合并行环境中用于纯运算符重载方法的适用性。我们量化了伴随向量上原子更新的成本,并展示了通过正向和反向通过OpDiLib的不同配置可以实现的加速和缩放。
更新日期:2021-02-24
down
wechat
bug