论文标题
有限差异模板操作员的时间阻止,稀疏的“网格”来源
Temporal blocking of finite-difference stencil operators with sparse "off-the-grid" sources
论文作者
论文摘要
模具内核主导着一系列科学应用,包括地震和医学成像,图像处理和神经网络。时间阻止是一种绩效优化,旨在通过在多个时间步长中重新使用Cache的数据来减少模具计算的所需内存带宽。它已经被证明对这类算法有益。但是,将时间阻塞应用于实用应用的模板仍然具有挑战性。这些计算通常由稀疏的运算符组成,与计算网格不符(“网格”)。我们的工作是通过建模问题来激励的,其中源注射会导致波场,然后必须通过插值从格栅波场进行插值来测量这些波段。由此产生的数据依赖性使时间阻止的采用更具挑战性。我们提出了一种检查这些数据依赖性并重新排序计算的方法,从而导致在不适用时间阻塞的模具代码中的性能提高。我们在Devito域特异性编译器工具链中实现了这种新颖的方案。 DeVito使用高级符号问题定义的有限差分方法实现了嵌入Python中的特定领域语言,以生成优化的部分微分方程求解器。我们使用各向同性声学,各向异性声学和各向同性弹性波传播器评估我们的方案。自动调整后,绩效评估表明,通过对高度高达1.6倍的高度优化矢量化的空间阻滞代码进行时间阻断,可以实现大量性能改善。
Stencil kernels dominate a range of scientific applications, including seismic and medical imaging, image processing, and neural networks. Temporal blocking is a performance optimization that aims to reduce the required memory bandwidth of stencil computations by re-using data from the cache for multiple time steps. It has already been shown to be beneficial for this class of algorithms. However, applying temporal blocking to practical applications' stencils remains challenging. These computations often consist of sparsely located operators not aligned with the computational grid ("off-the-grid"). Our work is motivated by modeling problems in which source injections result in wavefields that must then be measured at receivers by interpolation from the grided wavefield. The resulting data dependencies make the adoption of temporal blocking much more challenging. We propose a methodology to inspect these data dependencies and reorder the computation, leading to performance gains in stencil codes where temporal blocking has not been applicable. We implement this novel scheme in the Devito domain-specific compiler toolchain. Devito implements a domain-specific language embedded in Python to generate optimized partial differential equation solvers using the finite-difference method from high-level symbolic problem definitions. We evaluate our scheme using isotropic acoustic, anisotropic acoustic, and isotropic elastic wave propagators of industrial significance. After auto-tuning, performance evaluation shows that this enables substantial performance improvement through temporal blocking over highly-optimized vectorized spatially-blocked code of up to 1.6x.