将 Flang Fortran 编译器与标准 MLIR 完全集成
Fully integrating the Flang Fortran compiler with standard MLIR
AI总结:
本文提出将 Flang Fortran 编译器与标准 MLIR 完全集成,通过构建 Fortran 与标准 MLIR 的映射,在多项基准测试中实现了比 Flang 现有方法最高达三倍的性能提升。
摘要:
Fortran 是 HPC 代码开发的通用语言,因此,作为社区,我们拥有能够生成高性能可执行文件的开源 Fortran 编译器至关重要。Flang 是 LLVM 的 Fortran 编译器,它利用了 MLIR 这一可重用的编译器基础设施,后者作为 LLVM 的一部分,近年来已变得流行。然而,尽管 Flang 利用了 MLIR,但它并未与其完全集成,而是提供了定制的翻译和优化过程来针对 LLVM-IR。在本文中,我们首先针对一系列基准测试探索了 Flang 与 HPC 中其他流行编译器的性能对比,然后描述了 Fortran 与标准 MLIR 之间的映射,并探索了其性能。这项工作的结果是,在所运行的基准测试和实验中,与 Flang 现有方法相比,速度提升了高达三倍,这表明 Flang 社区应认真考虑利用标准 MLIR。
英文摘要:
Fortran is the lingua franca of HPC code development and as such it is crucial that we as a community have open source Fortran compilers capable of generating high performance executables. Flang is LLVM's Fortran compiler and leverages MLIR which is a reusable compiler infrastructure which, as part of LLVM, has become popular in recent years. However, whilst Flang leverages MLIR it does not fully integrate with it and instead provides bespoke translation and optimisation passes to target LLVM-IR. In this paper we first explore the performance of Flang against other compilers popular in HPC for a range of benchmarks before describing a mapping between Fortran and standard MLIR, exploring the performance of this. The result of this work is an up to three times speed up compared with Flang's existing approach across the benchmarks and experiments run, demonstrating that the Flang community should seriously consider leveraging standard MLIR.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。