arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.17754cs.DCcs.ETcs.PL
收藏

面向晶圆级的 stencil 机器学习中间表示降低流水线

An MLIR Lowering Pipeline for Stencils at Wafer-Scale

Technische Universität Berlin(柏林工业大学);EPCC(爱丁堡计算中心);School of Informatics, The University of Edinburgh(爱丁堡大学信息学院);The University of Edinburgh(爱丁堡大学);Imperial College London(伦敦帝国理工学院);University of Cambridge(剑桥大学)

Nicolai Stawinoga, David Katz, Anton Lydike, Justs Zarins, Nick Brown, George Bisbas, Tobias Grosser

AI总结:

本文提出了一种编译器流水线,利用 stencil 领域信息,将 stencil 内核转换为 WSE 的 CSL 代码,实现了高效性能。

摘要:

Cerebras 晶圆级引擎(WSE)在计算单元数量上达到了前所未有的规模,超过900000个计算单元,全部通过单晶圆片上芯片互连连接。最初设计用于人工智能,WSE 架构也适用于高性能计算(HPC)。然而,其分布式异步编程模型与通常为给定数学程序描述推导出的简单顺序或批量同步程序有显著差异。针对 WSE 需要将现有代码重新实现。由于 MLIR 等编译器中没有 WSE 支持,因此自动化这一过程几乎没有希望。stencils 在 HPC 中普遍存在,在本文中,我们探讨了利用 stencil 领域信息可以帮助编译器自动针对 WSE 进行优化,而无需更改应用程序级别代码的假设。我们提出了一个编译器流水线,将基于 stencil 的内核转换为高度优化的 CSL 代码,以 WSE 为目标,弥合了问题的数学表示与 WSE 的异步执行模型之间的语义差距。基于三种 HPC 编程技术的五个基准测试,在 Cerebras WSE2 和 WSE3 上运行,我们的方法在性能上与手动优化的代码相当,甚至略好。此外,无需任何应用程序级别的代码更改,使用我们的方法时,WSE3 的性能比 128 个 Nvidia A100 GPU 快约 14 倍,比 128 个 CPU 基础的 Cray-EX 超级计算机快 20 倍。

英文摘要:

The Cerebras Wafer-Scale Engine (WSE) delivers performance at an unprecedented scale of over 900,000 compute units, all connected via a single-wafer on-chip interconnect. Initially designed for AI, the WSE architecture is also well-suited for High Performance Computing (HPC). However, its distributed asynchronous programming model diverges significantly from the simple sequential or bulk-synchronous programs that one would typically derive for a given mathematical program description. Targeting the WSE requires a bespoke re-implementation when porting existing code. The absence of WSE support in compilers such as MLIR, meant that there was little hope for automating this process. Stencils are ubiquitous in HPC, and in this paper we explore the hypothesis that domain specific information about stencils can be leveraged by the compiler to automatically target the WSE without requiring application-level code changes. We present a compiler pipeline that transforms stencil-based kernels into highly optimized CSL code for the WSE, bridging the semantic gap between the mathematical representation of the problem and the WSE's asynchronous execution model. Based upon five benchmarks across three HPC programming technologies, running on both the Cerebras WSE2 and WSE3, our approach delivers comparable, if not slightly better, performance than manually optimized code. Furthermore, without requiring any application level code changes, performance on the WSE3 is around 14 times faster than 128 Nvidia A100 GPUs and 20 times faster than 128 nodes of a CPU-based Cray-EX supercomputer when using our approach.

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

↑