arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.03317cs.DC
收藏

StarPlat:一种用于图分析的通用领域特定语言(DSL)

StarPlat: A Versatile DSL for Graph Analytics

Nibedita Behera, Ashwina Kumar, Ebenezer Rajadurai T, Sai Nitish, Rajesh Pandian M, Rupesh Nasre

AI总结:

针对现有图算法并行框架仅支持单一架构的问题,提出通用图DSL StarPlat,通过中间表示从同一算法规范生成多核、分布式、GPU三类后端代码,性能接近手工库代码,验证了跨架构高效代码生成的可行性。

摘要:

图可对多种现实世界现象建模。随着非结构化和半结构化数据的增长,图算法的并行化已成为必然趋势。遗憾的是,由于计算、内存访问和通信固有的不规则性,图算法的并行化传统上一直颇具挑战性。为应对这一难题,研究人员已提出多种库、框架和领域特定语言(DSL),以减轻通常为领域专家的用户的并行编程负担。然而,现有的图算法建模框架通常仅针对单一架构。本文提出一种名为StarPlat的图DSL,它允许程序员以高层形式指定图算法,且能从同一算法规范为三种不同后端生成代码。具体而言,该DSL编译器可为多核生成OpenMP代码、为分布式环境生成MPI代码、为众核GPU生成CUDA代码。由于这三者是完全不同的并行编程范式,将它们整合在同一种语言下极具挑战性。本文分享了我们在语言设计方面的经验。编译器的核心是一种中间表示,它为高层程序提供统一表示,各后端的代码生成都基于此表示展开。我们通过指定四种图算法——介数中心性计算、PageRank计算、单源最短路径和三角形计数——展示了StarPlat的表达能力。我们将生成代码的性能与手工编写的库代码的性能进行对比,验证了我们方法的有效性。结果发现,在多数情况下,生成代码的性能与基于库的代码相当。更重要的是,我们证明了从同一图算法规范为不同目标架构生成高效代码的可行性。

英文摘要:

Graphs model several real-world phenomena. With the growth of unstructured and semi-structured data, parallelization of graph algorithms is inevitable. Unfortunately, due to inherent irregularity of computation, memory access, and communication, graph algorithms are traditionally challenging to parallelize. To tame this challenge, several libraries, frameworks, and domain-specific languages (DSLs) have been proposed to reduce the parallel programming burden of the users, who are often domain experts. However, existing frameworks to model graph algorithms typically target a single architecture. In this paper, we present a graph DSL, named StarPlat, that allows programmers to specify graph algorithms in a high-level format, but generates code for three different backends from the same algorithmic specification. In particular, the DSL compiler generates OpenMP for multi-core, MPI for distributed, and CUDA for many-core GPUs. Since these three are completely different parallel programming paradigms, binding them together under the same language is challenging. We share our experience with the language design. Central to our compiler is an intermediate representation which allows a common representation of the high-level program, from which individual backend code generations begin. We demonstrate the expressiveness of StarPlat by specifying four graph algorithms: betweenness centrality computation, page rank computation, single-source shortest paths, and triangle counting. We illustrate the effectiveness of our approach by comparing the performance of the generated codes with that obtained with hand-crafted library codes. We find that the generated code is competitive to library-based codes in many cases. More importantly, we show the feasibility to generate efficient codes for different target architectures from the same algorithmic specification of graph algorithms.

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

↑