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.
翻译:本文为稀散的沙粒收缩计算提供了一个代码生成器。 它在稀散的聚体框架( SPF) 中利用环形巢计算数学的数学表示法, 以扩展多面形模型, 支持非室内计算, 例如在稀散的沙粒体中产生的非室内计算。 SPF 扩展以进行布局规范、 优化和代码生成, 稀散的沙粒代码:1) 我们开发了一个多面形布局规格, 为布局和计算开发一个分离迭接空间; 2) 我们通过将稀散的沙粒的布局和合成的代码结合, 来对稀散的沙粒体进行高效的共触点。 我们还通过 SMT 求解析器, 来将生成的代码与其他高压编译器( TACO) 生成的代码进行比较 。 我们平均实现了1.63 美元 的平行性能, 比 稀薄的共振动调调调调和描述如何通过转换查找的算算算法来将它提高到2. 72\ 平均的比值。 我们还证明, 解析的布空间的混合计算法可以支持进行更多的计算。