基于协同迭代的稀疏张量收缩的多面体描述及代码生成
Polyhedral Specification and Code Generation of Sparse Tensor Contraction with Co-Iteration
摘要:
本文提出了一种用于稀疏张量压缩计算的代码生成器。它利用稀疏多面体框架(SPF)中循环嵌套计算的数学表示,该框架扩展了多面体模型以支持非仿射计算,例如稀疏张量中出现的计算。SPF扩展到执行稀疏张量代码的布局规范,优化和代码生成:1)我们开发了一个多面体布局规范,该规范将迭代空间用于布局和计算;以及2)我们通过将多面体扫描一个稀疏张量的布局与代码合成相结合来开发稀疏张量的有效协同迭代,以通过SMT求解器在其他张量中找到相应的元素。我们比较所产生的代码,由一个国家的最先进的张量编译器,TACO。我们实现了平均1.63 $\times$更快的并行性能比TACO的稀疏稀疏的共同迭代,并描述了如何提高到2.72 $\times$平均加速比切换的发现算法。我们还表明,解耦的布局和计算的迭代空间,使额外的布局和计算的组合得到支持。
英文摘要:
This paper presents a code generator for sparse tensor contraction computations. It leverages a mathematical representation of loop nest computations in the sparse polyhedral framework (SPF), which extends the polyhedral model to support non-affine computations, such as arise in sparse tensors. SPF is extended to perform layout specification, optimization, and code generation of sparse tensor code: 1) we develop a polyhedral layout specification that decouples iteration spaces for layout and computation; and, 2) we develop efficient co-iteration of sparse tensors by combining polyhedra scanning over the layout of one sparse tensor with the synthesis of code to find corresponding elements in other tensors through an SMT solver. We compare the generated code with that produced by a state-of-the-art tensor compiler, TACO. We achieve on average 1.63$\times$ faster parallel performance than TACO on sparse-sparse co-iteration and describe how to improve that to 2.72$\times$ average speedup by switching the find algorithms. We also demonstrate that decoupling iteration spaces of layout and computation enables additional layout and computation combinations to be supported.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。