一句话:基于 MLIR 构建面向 HPC 模板 DSL 的共享编译栈,提供分布式消息传递抽象并支撑三个 DSL 编译器。
领域特定语言(DSL)能兼顾程序员生产力与高性能,其抽象让科学家以高层方式表达问题,并为优化编译器提供丰富信息以面向当代与下一代超算。然而 DSL 的便利与性能伴随高昂的开发与维护成本:DSL 编译器彼此孤立、无法共享基础设施,给其长期演进与大规模采用带来不确定性。本文将机器学习社区广泛使用的 MLIR 编译器框架裁剪适配到 HPC,把 ML 社区在 TensorFlow、PyTorch 等 DSL 间获得的协同效应引入有限差分模板 HPC 社区。作者为面向分布式模板计算的消息传递引入新的 HPC 专用抽象,并在 Devito、PSyclone 和 Open Earth Compiler 三个不同的 HPC 模板 DSL 编译器之间共享公共组件,表明该框架能在共享编译器生态之上生成高性能可执行程序。
Domain Specific Languages (DSLs) increase programmer productivity and provide high performance. Their targeted abstractions allow scientists to express problems at a high level, providing rich details that optimizing compilers can exploit to target current- and next-generation supercomputers. The convenience and performance of DSLs come with significant development and maintenance costs. The siloed design of DSL compilers and the resulting inability to benefit from shared infrastructure cause uncertainties around longevity and the adoption of DSLs at scale. By tailoring the broadly-adopted MLIR compiler framework to HPC, we bring the same synergies that the machine learning community already exploits across their DSLs (e.g. Tensorflow, PyTorch) to the finite-difference stencil HPC community. We introduce new HPC-specific abstractions for message passing targeting distributed stencil computations. We demonstrate the sharing of common components across three distinct HPC stencil-DSL compilers: Devito, PSyclone, and the Open Earth Compiler, showing that our framework generates high-performance executables based upon a shared compiler ecosystem.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2404-02218,
title = {A shared compilation stack for distributed-memory parallelism in stencil DSLs},
author = {George Bisbas and Anton Lydike and Emilien Bauer and Nick Brown and Mathieu Fehr and Lawrence Mitchell and Gabriel Rodriguez-Canal and Maurice Jamieson and Paul H. J. Kelly and Michel Steuwer and Tobias Grosser},
booktitle = {ASPLOS},
year = {2024},
doi = {10.1145/3620666.3651344}
}