arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2001.00532cs.MScs.PL
收藏

稀疏和稠密张量代数的统一迭代空间变换框架

A Unified Iteration Space Transformation Framework for Sparse and Dense Tensor Algebra

Ryan Senanayake, Fredrik Kjolstad, Changwan Hong, Shoaib Kamil, Saman Amarasinghe

摘要:

我们解决的问题,优化混合稀疏和稠密张量代数在编译器中。我们表明,标准的循环变换,如条带挖掘,平铺,折叠,并行化和向量化,可以应用到稀疏迭代空间上的不规则循环。我们还展示了如何将这些变换应用于稀疏张量数据结构的连续值数组,我们称之为位置空间,以解锁负载平衡的平铺和并行性。我们已经在开源TACO系统中对这些概念进行了原型化,在那里它们被公开为类似于Halide域特定语言的调度API,用于密集计算。使用这个调度API,我们展示了如何优化混合稀疏/密集张量代数表达式,如何通过在位置空间中调度稀疏张量代数来生成负载平衡代码,以及如何生成稀疏张量代数GPU代码。我们的评估表明,我们的转换,让我们生成良好的代码,与许多手工优化的实现从文献中的竞争力。

英文摘要:

We address the problem of optimizing mixed sparse and dense tensor algebra in a compiler. We show that standard loop transformations, such as strip-mining, tiling, collapsing, parallelization and vectorization, can be applied to irregular loops over sparse iteration spaces. We also show how these transformations can be applied to the contiguous value arrays of sparse tensor data structures, which we call their position space, to unlock load-balanced tiling and parallelism. We have prototyped these concepts in the open-source TACO system, where they are exposed as a scheduling API similar to the Halide domain-specific language for dense computations. Using this scheduling API, we show how to optimize mixed sparse/dense tensor algebra expressions, how to generate load-balanced code by scheduling sparse tensor algebra in position space, and how to generate sparse tensor algebra GPU code. Our evaluation shows that our transformations let us generate good code that is competitive with many hand-optimized implementations from the literature.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑