Automated code generation allows for a separation between the development of a model, expressed via a domain specific language, and lower level implementation details. Algorithmic differentiation can be applied symbolically at the level of the domain specific language, and the code generator reused to implement code required for an adjoint calculation. However the adjoint calculations are complicated by the well-known problem of storing or recomputing the forward model data required by the adjoint, and different checkpointing strategies have been developed to tackle this problem. This article describes the application of checkpointing strategies to high-level algorithmic differentiation, applied to codes developed using automated code generation. Since the high-level approach provides a simplified view of the model itself, the data required to restart the forward and data required to advance the adjoint can be identified, and the difference between them leveraged to implement checkpointing strategies of improved performance.
翻译:自动代码生成允许在模型开发(通过领域特定语言表达)与底层实现细节之间实现分离。算法微分可以在领域特定语言层面以符号方式应用,并复用代码生成器来实现伴随计算所需的代码。然而,伴随计算因存储或重新计算伴随所需的前向模型数据这一经典问题而变得复杂,为此已发展出多种检查点策略来解决该问题。本文描述了将检查点策略应用于高阶算法微分,并针对采用自动代码生成技术开发的代码展开实施。由于高阶方法提供了模型本身的简化视图,因此可以识别重新启动前向计算所需的数据与推进伴随计算所需的数据,并利用两者之间的差异来实现性能更优的检查点策略。