Polygeist: Raising C to Polyhedral MLIR

Polygeist: Raising C to Polyhedral MLIR
复制标题

Polygeist:将 C 提升为多面体 MLIR

DOI:
--
复制
发表时间:
2021
期刊:
International Conference on Parallel Architectures and Compilation Techniques
影响因子:
--
通讯作者:
O. Zinenko
O. Zinenko
中科院分区:
--
文献类型:
--
作者:
William S. Moses;Lorenzo Chelini;Ruizhe Zhao;O. Zinenko

文献摘要

被引文献

相似文献

我们提出了Polygeist,这是一种新的编译流程,它将MLIR编译器基础设施与尖端的多面体优化工具连接起来。它由一个C和C++前端组成,能够将广泛的现有代码转换为适合多面体转换的MLIR,并在MLIR和OpenScope交换格式之间进行双向转换。Polygeist/MLIR中间表示具有高级(仿射)环路构造和嵌入到单个静态赋值(SSA)基板中的n-D数组,实现了基于SSA和多面体优化的前所未有的组合。我们通过提出并实现两个额外的转换来说明这一点:语句拆分和约简并行。我们的评估表明,由于采用了新的表示和转换,Polygeist的性能在顺序(2.53x vs 1.41x,2.34x)和并行模式(9.47x vs 3.26x,7.54x)下以顺序(2.53x vs 1.41x,2.34x)运行时,平均表现优于LLVMIR级优化器(Polly)和源代码到源代码最先进的多面体编译器(Pluto)。
We present Polygeist, a new compilation flow that connects the MLIR compiler infrastructure to cutting edge polyhedral optimization tools. It consists of a C and C++ frontend capable of converting a broad range of existing codes into MLIR suitable for polyhedral transformation and a bi-directional conversion between MLIR and OpenScop exchange format. The Polygeist/MLIR intermediate representation featuring high-level (affine) loop constructs and n-D arrays embedded into a single static assignment (SSA) substrate enables an unprecedented combination of SSA-based and polyhedral optimizations. We illustrate this by proposing and implementing two extra transformations: statement splitting and reduction parallelization. Our evaluation demonstrates that Polygeist outperforms on average both an LLVM IR-level optimizer (Polly) and a source-to-source state-of-the-art polyhedral compiler (Pluto) when exercised on the Polybench/C benchmark suite in sequential (2.53x vs 1.41x, 2.34x) and parallel mode (9.47x vs 3.26x, 7.54x) thanks to the new representation and transformations.