KinetiX:面向化学动力学与输运性质的性能可移植代码生成器
KinetiX: A performance portable code generator for chemical kinetics and transport properties
AI总结:
本研究提出性能可移植的化学动力学代码生成工具KinetiX,针对CPU和GPU分别优化计算,在保证高精度的同时,相较Cantera和PelePhysics生成的代码实现了显著性能提升。
摘要:
我们提出了KinetiX这一软件工具包,用于生成计算高效的、针对特定燃料的子程序,以计算化学源项、热力学性质及混合平均输运性质,供燃烧模拟代码使用。这些C++子程序被设计为可在CPU和GPU架构上高性能运行。在CPU端,化学动力学计算通过消除冗余运算、采用数据对齐以及具备简单访问模式的循环(可实现自动向量化)来优化,降低了复杂数学运算的延迟。在GPU端,通过循环展开、减少高代价的指数运算次数以及限制活跃变量数量以优化寄存器使用,提升了性能。生成的子程序的准确性通过与Cantera计算的参考值对比进行验证,最大相对误差低于$10^{-7}$。我们在AMD和NVIDIA的部分最新CPU、GPU架构(即AMD EPYC 9653、AMD MI250X和NVIDIA H100)上评估了这些计算内核的性能。KinetiX生成的子程序性能优于通用的Cantera库,在CPU上,物种生成速率的加速比最高达2.4倍,混合平均输运性质的加速比最高达3.2倍。与PelePhysics(CEPTR)生成的子程序相比,在单线程基础上,KinetiX的物种生成速率内核在CPU上的加速比最高达2.6倍,在GPU上最高达1.7倍。
英文摘要:
We present KinetiX, a software toolkit to generate computationally efficient fuel-specific routines for the chemical source term, thermodynamic and mixture-averaged transport properties for use in combustion simulation codes. The C++ routines are designed for high-performance execution on both CPU and GPU architectures. On CPUs, chemical kinetics computations are optimized by eliminating redundant operations and using data alignment and loops with trivial access patterns that enable auto-vectorization, reducing the latency of complex mathematical operations. On GPUs, performance is improved by loop unrolling, reducing the number of costly exponential evaluations and limiting the number of live variables for better register usage. The accuracy of the generated routines is checked against reference values computed using Cantera and the maximum relative errors are below $10^{-7}$. We evaluate the performance of the kernels on some of the latest CPU and GPU architectures from AMD and NVIDIA, i.e., AMD EPYC 9653, AMD MI250X, and NVIDIA H100. The routines generated by KinetiX outperform the general-purpose Cantera library, achieving speedups of up to 2.4x for species production rates and 3.2x for mixture-averaged transport properties on CPUs. Compared to the routines generated by PelePhysics (CEPTR), KinetiX achieves speedups of up to 2.6x on CPUs and 1.7x on GPUs for the species production rates kernel on a single-threaded basis.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。