Verified tensor-program optimization via high-level scheduling rewrites

Verified tensor-program optimization via high-level scheduling rewrites
复制标题

DOI:
10.1145/3498717
复制
发表时间:
2022-01
影响因子:
--
通讯作者:
Amanda Liu;G. Bernstein;A. Chlipala;Jonathan Ragan-Kelley
Amanda Liu;G. Bernstein;A. Chlipala;Jonathan Ragan-Kelley
中科院分区:
--
文献类型:
--
作者:
Amanda Liu;G. Bernstein;A. Chlipala;Jonathan Ragan-Kelley

文献摘要

被引文献

相似文献

We present a lightweight Coq framework for optimizing tensor kernels written in a pure, functional array language. Optimizations rely on user scheduling using series of verified, semantics-preserving rewrites.对于用数组和嵌套循环定位命令代码的编译而言,所有重写都是纯粹的功能性语言中的来源。我们的语言包括一组用于表达高级计算细节的核心构造以及我们称之为Reshape Operator的一组,它们可以从核心构造中得出,但触发了有关存储模式和订购的低级决策。我们证明,该系统不仅能够得出现有的最先进语言(如卤化物)和生成性能相比的代码的优化,还可以安排一个有用的程序转换系列,而不是Hailide中可及的。
We present a lightweight Coq framework for optimizing tensor kernels written in a pure, functional array language. Optimizations rely on user scheduling using series of verified, semantics-preserving rewrites. Unusually for compilation targeting imperative code with arrays and nested loops, all rewrites are source-to-source within a purely functional language. Our language comprises a set of core constructs for expressing high-level computation detail and a set of what we call reshape operators, which can be derived from core constructs but trigger low-level decisions about storage patterns and ordering. We demonstrate that not only is this system capable of deriving the optimizations of existing state-of-the-art languages like Halide and generating comparably performant code, it is also able to schedule a family of useful program transformations beyond what is reachable in Halide.