论文标题
稀疏张量收缩与共介入的多面体规范和代码生成
Polyhedral Specification and Code Generation of Sparse Tensor Contraction with Co-Iteration
论文作者
论文摘要
本文提出了用于稀疏张量收缩计算的代码生成器。它利用稀疏多面体框架(SPF)中环巢计算的数学表示,该计算扩展了多面体模型以支持非伴随计算,例如在稀疏张量中出现。 SPF扩展以执行稀疏张量代码的布局规范,优化和代码生成:1)我们开发了一个多面体布局规范,该规范将迭代空间解散用于布局和计算; 2)我们通过将一个稀疏张量的布局与代码的合成结合在一个稀疏张量的布局上扫描来开发稀疏张量的有效共介入,以通过SMT求解器在其他张量中找到相应的元素。 我们将生成的代码与最先进的张量编译器Taco生成的代码进行了比较。我们平均达到1.63 $ \ times $ $的平行性能,比稀疏 - 帕斯斯(Sparse-Sparse)共同征用炸玉米饼,并描述如何通过切换查找算法来将其提高到2.72 $ \ tims $平均速度。我们还证明了布局和计算的解耦迭代空间可以支持其他布局和计算组合。
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.