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

一种基于多级IR的高性能稀疏张量代数算法

A High-Performance Sparse Tensor Algebra Compiler in Multi-Level IR

Ruiqin Tian, Luanzheng Guo, Jiajia Li, Bin Ren, Gokcen Kestor

摘要:

张量代数被广泛用于许多应用中,例如科学计算、机器学习和数据分析。表示真实世界数据的张量通常是大而稀疏的。存在数十种为稀疏矩阵和/或张量设计的存储格式,并且稀疏张量操作的性能取决于特定架构和/或所选择的稀疏格式,这使得实现和优化每个感兴趣的张量操作以及将代码从一个架构转移到另一个架构具有挑战性。我们提出了一个张量代数领域特定语言(DSL)和编译器基础设施,自动生成混合稀疏-密集张量代数操作的内核,名为COMET。拟议的DSL提供了类似于熟悉的爱因斯坦符号表示张量代数运算的高级编程抽象。编译器执行代码优化和转换,以实现高效的代码生成,同时覆盖广泛的张量存储格式。COMET编译器还利用数据重新排序来提高空间或时间局部性,以获得更好的性能。我们的研究结果表明,自动生成的内核的性能优于最先进的稀疏张量代数编译器,与高达20.92倍,6.39倍,和13.9倍的性能提高,并行SpMV,SpMM,和TTM TACO,分别。

英文摘要:

Tensor algebra is widely used in many applications, such as scientific computing, machine learning, and data analytics. The tensors represented real-world data are usually large and sparse. There are tens of storage formats designed for sparse matrices and/or tensors and the performance of sparse tensor operations depends on a particular architecture and/or selected sparse format, which makes it challenging to implement and optimize every tensor operation of interest and transfer the code from one architecture to another. We propose a tensor algebra domain-specific language (DSL) and compiler infrastructure to automatically generate kernels for mixed sparse-dense tensor algebra operations, named COMET. The proposed DSL provides high-level programming abstractions that resemble the familiar Einstein notation to represent tensor algebra operations. The compiler performs code optimizations and transformations for efficient code generation while covering a wide range of tensor storage formats. COMET compiler also leverages data reordering to improve spatial or temporal locality for better performance. Our results show that the performance of automatically generated kernels outperforms the state-of-the-art sparse tensor algebra compiler, with up to 20.92x, 6.39x, and 13.9x performance improvement, for parallel SpMV, SpMM, and TTM over TACO, respectively.

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

↑