桥接以控制为中心与以数据为中心的优化
Bridging Control-Centric and Data-Centric Optimization
AI总结:
本文提出DCIR流水线,通过MLIR方言与专用pass在DaCe框架内融合控制中心与数据中心优化,恢复参数化符号数据流,实验表明其持续优于MLIR并自动发现新优化机会。
摘要:
随着专用硬件和新编程语言的兴起,代码优化已将其重点转向促进数据局部性。大多数生产级编译器采用以控制为中心的思维方式——以指令驱动的优化辅以基于标量的数据流——而其他方法则提供领域专用和通用的数据移动最小化,这可能遗漏重要的控制流优化。由于这两种表示不可互换,用户必须选择其一。在本文中,我们探索了以控制为中心和以数据为中心的方法如何通过多级中间表示(MLIR)框架协同工作。通过结合一种MLIR方言和专用pass,我们恢复了参数化的、符号化的数据流,并可在DaCe框架内进行优化。我们将这两种视图合并到一条名为DCIR的流水线中,证明它严格比任一视图更强大。在多个基准测试和一个用C语言编写的实际应用中,我们表明所提出的流水线持续优于MLIR,并在无需额外努力的情况下自动发现新的优化机会。
英文摘要:
With the rise of specialized hardware and new programming languages, code optimization has shifted its focus towards promoting data locality. Most production-grade compilers adopt a control-centric mindset - instruction-driven optimization augmented with scalar-based dataflow - whereas other approaches provide domain-specific and general purpose data movement minimization, which can miss important control-flow optimizations. As the two representations are not commutable, users must choose one over the other. In this paper, we explore how both control- and data-centric approaches can work in tandem via the Multi-Level Intermediate Representation (MLIR) framework. Through a combination of an MLIR dialect and specialized passes, we recover parametric, symbolic dataflow that can be optimized within the DaCe framework. We combine the two views into a single pipeline, called DCIR, showing that it is strictly more powerful than either view. On several benchmarks and a real-world application in C, we show that our proposed pipeline consistently outperforms MLIR and automatically uncovers new optimization opportunities with no additional effort.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。