arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2201.03611cs.PL
收藏

RISE & Shine:面向存储的存储器设计

RISE & Shine: Language-Oriented Compiler Design

Michel Steuwer, Thomas Koehler, Bastian Köpcke, Federico Pizzuti

摘要:

软件和硬件专业化的趋势--由摩尔定律的终结和对特定领域计算(如机器学习)的兴趣仍在加速推动--迫使我们从根本上重新思考我们的编译器设计。通用编译器框架围绕一个单一的通用中间表示(IR)构建的时代已经结束。这种认识引发了MLIR编译器框架的创建,该框架使编译器工程师能够设计和集成捕获特定抽象的IR。MLIR为基于SSA的IR提供了一个通用框架,但它并不能帮助我们决定如何设计易于开发、使用和组合成工作编译器的IR。为了解决IR设计的挑战,我们提倡面向语言的编译器设计,理解IR作为正式的程序设计语言,并通过伴随的类型系统强制其正确使用。我们认为,程序设计语言技术直接指导可扩展的IR设计,并提供了一个正式的框架,原因多个IR之间的转换。在本文中,我们讨论了设计的Shine编译器,编译的高级功能模式为基础的数据并行语言RISE通过混合函数命令式中间语言C,OpenCL和OpenMP。我们将我们的工作直接与密切相关的基于模式的Lift IR和编译器进行比较。我们表明,我们的面向语言的编译器设计结果在一个更强大的和可预测的编译器,可扩展的各种抽象级别。我们的实验评估表明,这种编译器设计是能够生成高性能的GPU代码。

英文摘要:

The trend towards specialization of software and hardware - fuelled by the end of Moore's law and the still accelerating interest in domain-specific computing, such as machine learning - forces us to radically rethink our compiler designs. The era of a universal compiler framework built around a single one-size-fits-all intermediate representation (IR) is over. This realization has sparked the creation of the MLIR compiler framework that empowers compiler engineers to design and integrate IRs capturing specific abstractions. MLIR provides a generic framework for SSA-based IRs, but it doesn't help us to decide how we should design IRs that are easy to develop, to work with and to combine into working compilers. To address the challenge of IR design, we advocate for a language-oriented compiler design that understands IRs as formal programming languages and enforces their correct use via an accompanying type system. We argue that programming language techniques directly guide extensible IR designs and provide a formal framework to reason about transforming between multiple IRs. In this paper, we discuss the design of the Shine compiler that compiles the high-level functional pattern-based data-parallel language RISE via a hybrid functional-imperative intermediate language to C, OpenCL, and OpenMP. We compare our work directly with the closely related pattern-based Lift IR and compiler. We demonstrate that our language-oriented compiler design results in a more robust and predictable compiler that is extensible at various abstraction levels. Our experimental evaluation shows that this compiler design is able to generate high-performance GPU code.

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

↑