论文标题

现代GPU的代码生成期间的分析性能估计

Analytical Performance Estimation during Code Generation on Modern GPUs

论文作者

Ernst, Dominik, Holzer, Markus, Hager, Georg, Knorr, Matthias, Wellein, Gerhard

论文摘要

自动代码生成通常用于创建专门调整到特定硬件和应用程序参数的算法的实现。代码生成过程涉及选择足够的代码转换,调整参数和并行化策略。我们提出了一种替代时间密集型自动传动,方案特定性能模型或黑框机器学习以选择最佳表现配置的替代方案。 本文通过性能模型与分析硬件指标估计器相结合的性能模型来确定用于内存密集型GPU应用的相关性能定义机制。这使得对大型配置空间的快速探索能够以高度准确地识别高效的代码候选物。 我们研究了与前任V100相比,A100 GPU体系结构的变化,并解决了如何通过新的内存层次结构对数据传输量进行建模的挑战。 我们展示了如何将我们的方法耦合到Pystencis模板代码生成器,该代码生成器用于生成距离4DD-25PT模板的内核和基于Lattice Boltzmann方法的复杂的两相流体求解器。对于这两个方面,它都提供了可用于选择表现最佳的候选人的排名。 该方法不限于模板内核,而可以集成到任何可以生成所需地址表达式的代码生成器中。

Automatic code generation is frequently used to create implementations of algorithms specifically tuned to particular hardware and application parameters. The code generation process involves the selection of adequate code transformations, tuning parameters, and parallelization strategies. We propose an alternative to time-intensive autotuning, scenario-specific performance models, or black-box machine learning to select the best-performing configuration. This paper identifies the relevant performance-defining mechanisms for memory-intensive GPU applications through a performance model coupled with an analytic hardware metric estimator. This enables a quick exploration of large configuration spaces to identify highly efficient code candidates with high accuracy. We examine the changes of the A100 GPU architecture compared to the predecessor V100 and address the challenges of how to model the data transfer volumes through the new memory hierarchy. We show how our method can be coupled to the pystencils stencil code generator, which is used to generate kernels for a range-four 3D-25pt stencil and a complex two-phase fluid solver based on the Lattice Boltzmann Method. For both, it delivers a ranking that can be used to select the best-performing candidate. The method is not limited to stencil kernels but can be integrated into any code generator that can generate the required address expressions.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源