arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.03487cs.DCcs.LGcs.PF
收藏

ParaGraph:用于HPC内核性能优化的加权图表示

ParaGraph: Weighted Graph Representation for Performance Optimization of HPC Kernels

Iowa State University(爱荷华州立大学);Stony Brook University(石溪大学);Brookhaven National Laboratory(布鲁克海文国家实验室)

Ali TehraniJamsaz, Alok Mishra, Akash Dutta, Abid M. Malik, Barbara Chapman, Ali Jannesari

AI总结:

本文提出ParaGraph,一种扩展AST并引入边权重的加权图程序表示方法,通过训练GNN预测OpenMP代码在CPU和GPU上的运行时来优化HPC内核性能,归一化RMSE低至0.004。

摘要:

基于GPU的HPC集群因其广泛的并行性和能效正吸引着越来越多的科学应用开发者。为了在各种多核/众核架构之间实现可移植性,应用开发者通常选择使用基于指令的并行编程模型,例如OpenMP。然而,即使使用OpenMP,开发者仍需从多种策略中选择以利用GPU或CPU。近年来,机器学习(ML)方法为HPC应用的优化带来了显著进展。为此,已有多种方法被提出用于为ML模型表示应用特征。然而,现有技术无法捕捉对暴露并行性至关重要的特征。本文引入了一种新的基于图的并行应用程序表示方法,该方法扩展了抽象语法树(AST)以表示控制和数据流信息。这项工作的创新之处在于添加了利用AST中隐式顺序和父子关系的新边,并引入边权重以处理循环和条件信息。我们通过训练图神经网络(GNN)来预测OpenMP代码区域在CPU和GPU上的运行时,以此评估所提出的表示方法。利用collapse和CPU与GPU之间的数据传输的各种转换被用于构建数据集。模型的预测运行时用于确定哪种转换提供最佳性能。结果表明,我们的方法确实有效,在运行时预测中,归一化RMSE最低可达0.004,最高不超过0.01。

英文摘要:

GPU-based HPC clusters are attracting more scientific application developers due to their extensive parallelism and energy efficiency. In order to achieve portability among a variety of multi/many core architectures, a popular choice for an application developer is to utilize directive-based parallel programming models, such as OpenMP. However, even with OpenMP, the developer must choose from among many strategies for exploiting a GPU or a CPU. Recently, Machine Learning (ML) approaches have brought significant advances in the optimizations of HPC applications. To this end, several ways have been proposed to represent application characteristics for ML models. However, the available techniques fail to capture features that are crucial for exposing parallelism. In this paper, we introduce a new graph-based program representation for parallel applications that extends the Abstract Syntax Tree to represent control and data flow information. The originality of this work lies in the addition of new edges exploiting the implicit ordering and parent-child relationships in ASTs, as well as the introduction of edge weights to account for loop and condition information. We evaluate our proposed representation by training a Graph Neural Network (GNN) to predict the runtime of an OpenMP code region across CPUs and GPUs. Various transformations utilizing collapse and data transfer between the CPU and GPU are used to construct the dataset. The predicted runtime of the model is used to determine which transformation provides the best performance. Results show that our approach is indeed effective and has normalized RMSE as low as 0.004 to at most 0.01 in its runtime predictions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑