arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1803.00419cs.PLcs.PF
收藏

关于Tiramisu的技术报告:一种用于隐藏DSL制造商硬件复杂性的三层抽象

Technical Report about Tiramisu: a Three-Layered Abstraction for Hiding Hardware Complexity from DSL Compilers

Riyadh Baghdadi, Jessica Ray, Malek Ben Romdhane, Emanuele Del Sozzo, Patricia Suriana, Shoaib Kamil, Saman Amarasinghe

摘要:

高性能DSL开发人员努力利用现代硬件。DSL编译器必须构建自己的复杂中间端,然后才能针对诸如LLVM之类的公共后端,LLVM仅处理具有SIMD指令的单个指令流。我们介绍Tiramisu,这是一个常见的中端,可以为现代处理器和加速器(如多核,GPU,FPGA和分布式集群)生成高效的代码。Tiramisu引入了一种新颖的三级IR,它将算法、算法的执行方式以及中间数据的存储位置分开。这种分离简化了优化,并使从同一算法中定位多个硬件架构变得更容易。因此,DSL编译器可以在不损失性能的情况下大大降低复杂性,同时立即针对多个硬件或硬件组合,例如具有CPU和GPU的分布式节点。我们通过为Halide和Julia编译器创建一个新的中间端来评估Tiramisu。我们表明,Tiramisu扩展了Halide和Julia的许多新功能,包括表达新算法(如递归滤波器和非矩形迭代空间),执行新的复杂循环嵌套变换(如波前并行化,循环移位和循环融合),并为更多架构(如分布式集群,多核,GPU和FPGA的组合)生成有效的代码。最后,我们展示了Tiramisu可以生成与高度优化的英特尔MKL gemm(广义矩阵乘法)实现相匹配的非常高效的代码,我们还展示了由于Tiramisu实现的优化,Halide中的加速倍数达到4倍,Julia中的加速倍数达到16倍。

英文摘要:

High-performance DSL developers work hard to take advantage of modern hardware. The DSL compilers have to build their own complex middle-ends before they can target a common back-end such as LLVM, which only handles single instruction streams with SIMD instructions. We introduce Tiramisu, a common middle-end that can generate efficient code for modern processors and accelerators such as multicores, GPUs, FPGAs and distributed clusters. Tiramisu introduces a novel three-level IR that separates the algorithm, how that algorithm is executed, and where intermediate data are stored. This separation simplifies optimization and makes targeting multiple hardware architectures from the same algorithm easier. As a result, DSL compilers can be made considerably less complex with no loss of performance while immediately targeting multiple hardware or hardware combinations such as distributed nodes with both CPUs and GPUs. We evaluated Tiramisu by creating a new middle-end for the Halide and Julia compilers. We show that Tiramisu extends Halide and Julia with many new capabilities including the ability to: express new algorithms (such as recurrent filters and non-rectangular iteration spaces), perform new complex loop nest transformations (such as wavefront parallelization, loop shifting and loop fusion) and generate efficient code for more architectures (such as combinations of distributed clusters, multicores, GPUs and FPGAs). Finally, we demonstrate that Tiramisu can generate very efficient code that matches the highly optimized Intel MKL gemm (generalized matrix multiplication) implementation, we also show speedups reaching 4X in Halide and 16X in Julia due to optimizations enabled by Tiramisu.

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

↑