一句话:提出 StructTensor,在编译期符号化计算张量结构,并用 STUR 统一表示稀疏与冗余结构,优化密集与稀疏张量代数性能。
张量代数广泛用于数据密集型计算,但密集张量代数提供的专门化与稀疏张量带来的算法效率之间存在权衡。本文提出 StructTensor 框架,在编译期符号化地计算张量结构;其核心是结构化张量统一表示 STUR,一种可同时刻画张量计算及其稀疏性和冗余性结构的中间语言。作者从无损张量计算的数学视角证明符号结构计算及相关优化是可靠的。实验表明,在不同张量计算工作负载和结构上,捕捉符号结构可使系统在密集和稀疏张量代数上均优于现有最先进框架。
Tensor algebra is essential for data-intensive workloads in various computational domains. Computational scientists face a trade-off between the specialization degree provided by dense tensor algebra and the algorithmic efficiency that leverages the structure provided by sparse tensors. This paper presents StructTensor, a framework that symbolically computes structure at compilation time. This is enabled by Structured Tensor Unified Representation (STUR), an intermediate language that can capture tensor computations as well as their sparsity and redundancy structures. Through a mathematical view of lossless tensor computations, we show that our symbolic structure computation and the related optimizations are sound. Finally, for different tensor computation workloads and structures, we experimentally show how capturing the symbolic structure can result in outperforming state-of-the-art frameworks for both dense and sparse tensor algebra.
@article{paperbot1842,
title = {Compiling Structured Tensor Algebra},
author = {Mahdi Ghorbani and Mathieu Huot and Shideh Hashemian and Amir Shaikhha},
journal = {Proceedings of the ACM on Programming Languages},
volume = {7},
number = {OOPSLA2},
year = {2023},
doi = {10.1145/3622804}
}