[论文解读] Tiramisu: A Code Optimization Framework for High Performance Systems
Tiramisu 是一个基于多面体的代码优化框架,将算法、调度、数据布局和通信解耦为四级中间表示(IR),从而实现对多核 CPU、GPU、FPGA 和分布式系统等多种高性能架构的高效代码生成。它扩展了 Halide 的功能,其性能可与手写优化的库(如 Intel MKL)相媲美或超越,在多核系统上最高可实现 4 倍的加速。
This paper introduces Tiramisu, an optimization framework designed to generate efficient code for high-performance systems such as multicores, GPUs, FPGAs, distributed machines, or any combination of these. Tiramisu relies on a flexible representation based on the polyhedral model and introduces a novel four-level IR that allows full separation between algorithms, schedules, data-layouts and communication. This separation simplifies targeting multiple hardware architectures from the same algorithm. We evaluate Tiramisu by writing a set of linear algebra and DNN kernels and by integrating it as a pass in the Halide compiler. We show that Tiramisu extends Halide with many new capabilities, and that Tiramisu can generate efficient code for multicores, GPUs, FPGAs and distributed heterogeneous systems. The performance of code generated by the Tiramisu backends matches or exceeds hand-optimized reference implementations. For example, the multicore backend matches the highly optimized Intel MKL library on many kernels and shows speedups reaching 4x over the original Halide.
研究动机与目标
- 解决为异构系统(如多核 CPU、GPU、FPGA 和分布式集群)编写可移植、高性能代码的挑战。
- 克服现有代码生成框架中算法、调度、数据布局和通信之间紧密耦合的问题。
- 实现自动代码生成,使其在多种架构上的性能可与手写优化实现相匹配或超越。
- 通过作为后端传递集成的方式,扩展 Halide 编译器的新优化能力。
提出的方法
- 采用灵活的多面体模型表示,以精确的依赖分析表达数据并行计算。
- 引入一种新颖的四级中间表示(IR),明确分离算法、调度、数据布局和通信。
- 利用四级 IR 将算法逻辑与底层实现细节解耦,实现独立优化与复用。
- 通过独立表达调度和数据布局,支持针对多种目标架构的代码生成,而无需依赖算法本身。
- 将 Tiramisu 作为 Halide 编译器中的一个传递集成,以利用 Halide 已有的基础设施,同时扩展其能力。
- 通过自动调度和布局转换,为多核、GPU、FPGA 和分布式异构系统生成优化代码。
实验结果
研究问题
- RQ1统一框架能否为包括多核 CPU、GPU、FPGA 和分布式系统在内的多种架构生成高性能代码?
- RQ2通过将算法、调度、数据布局和通信分离的四级 IR,其在代码可移植性和性能方面的提升效果如何?
- RQ3Tiramisu 在多核系统上能否在性能上匹配或超越手写优化的库(如 Intel MKL)?
- RQ4Tiramisu 如何扩展 Halide 编译器在代码生成和优化方面的能力?
- RQ5与原始的 Halide 实现相比,使用 Tiramisu 的自动优化流水线可带来多大的性能提升?
主要发现
- Tiramisu 从同一算法规范生成适用于多核、GPU、FPGA 和分布式异构系统的代码。
- Tiramisu 的多核后端在许多线性代数和深度学习(DNN)核函数上,性能可与高度优化的 Intel MKL 库相媲美。
- 在多核系统上,Tiramisu 相较于原始 Halide 实现最高可实现 4 倍的加速。
- 将 Tiramisu 作为 Halide 中的一个传递集成,扩展了 Halide 的能力,支持新的硬件目标和优化策略。
- 四级 IR 实现了完全的职责分离,简化了在多种架构上的代码生成与维护。
- Tiramisu 后端生成的代码在所有评估平台上的性能均与或优于手写优化的参考实现。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。