混合四面体网格上无矩阵有限元方法的代码生成与性能工程
Code Generation and Performance Engineering for Matrix-Free Finite Element Methods on Hybrid Tetrahedral Grids
AI总结:
本文提出一款面向混合四面体网格无矩阵有限元算子的代码生成器,通过AST变换、网格局部结构适配的循环模式等优化,实现最高58倍加速与万亿自由度问题的极致可扩展求解。
摘要:
本文介绍了一款代码生成器,专为混合四面体网格上的节点级优化、极致可扩展的无矩阵有限元算子设计。它通过查表、循环不变量外提、单元间向量化等多种技术——以抽象语法树变换的形式实现——优化双线性型的局部求值。本文的一项核心贡献是开发、分析并生成了高效的循环模式,这些模式利用了底层四面体网格的局部结构,显著提升了缓存局部性和运算强度,缓解了计算稀疏的低阶算子所面临的带宽压力。\n本文通过一套包含性能分析、瓶颈识别与专用优化生成的完整迭代流程,展示了该生成器的能力。针对三种微分算子($-Δ$、$-\nabla \cdot (k(\boldsymbol{x})\nabla)$、$α(\boldsymbol{x})\boldsymbol{\text{curl}}\boldsymbol{\text{curl}}+β(\boldsymbol{x})$),我们确定了最有效的优化集合。经生成器应用后,相较于参考实现,这些优化带来了最高58倍的加速比。详细的节点级性能分析显示,无矩阵算子的吞吐量可达1.3至2.1 GDoF/s,在36核Intel Ice Lake插槽上达到了最高62%的峰值性能。最后,在21504个进程上用不到50秒求解了自由度超过一万亿($10^{12}$)的旋度-旋度问题,证明了生成的算子作为完整多重网格求解器组成部分的性能与极致可扩展性。
英文摘要:
This paper introduces a code generator designed for node-level optimized, extreme-scalable, matrix-free finite element operators on hybrid tetrahedral grids. It optimizes the local evaluation of bilinear forms through various techniques including tabulation, relocation of loop invariants, and inter-element vectorization - implemented as transformations of an abstract syntax tree. A key contribution is the development, analysis, and generation of efficient loop patterns that leverage the local structure of the underlying tetrahedral grid. These significantly enhance cache locality and arithmetic intensity, mitigating bandwidth-pressure associated with compute-sparse, low-order operators. The paper demonstrates the generator's capabilities through a comprehensive educational cycle of performance analysis, bottleneck identification, and emission of dedicated optimizations. For three differential operators ($-Δ$, $-\nabla \cdot (k(\mathbf{x})\, \nabla\,)$, $α(\mathbf{x})\, \mathbf{curl}\ \mathbf{curl} + β(\mathbf{x}) $), we determine the set of most effective optimizations. Applied by the generator, they result in speed-ups of up to 58$\times$ compared to reference implementations. Detailed node-level performance analysis yields matrix-free operators with a throughput of 1.3 to 2.1 GDoF/s, achieving up to 62% peak performance on a 36-core Intel Ice Lake socket. Finally, the solution of the curl-curl problem with more than a trillion ($ 10^{12}$) degrees of freedom on 21504 processes in less than 50 seconds demonstrates the generated operators' performance and extreme-scalability as part of a full multigrid solver.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。