利用张量对称性实现高性能:对称张量的乘法
Exploiting Symmetry in Tensors for High Performance: Multiplication with Symmetric Tensors
AI总结:
提出一种分块压缩对称存储格式和分块算法,通过避免冗余存储和计算,将对称张量乘法的存储需求降低O(m!)倍,计算需求降低O((m+1)!/2^m)倍。
摘要:
对称张量运算出现在各种计算中。然而,利用对称性来减少存储和计算的优势与简化内存访问模式的愿望相冲突。在本文中,我们提出了一种分块数据结构(分块压缩对称存储),其中我们按块考虑张量,并仅存储对称张量的唯一块。我们提出了一种逐块算法,该算法已被证明对矩阵计算有益,通过利用一系列临时张量来避免冗余计算,从而利用这种存储格式。此外,还利用临时张量内的部分对称性来进一步避免冗余存储和冗余计算。详细分析表明,相对于不利用对称性和部分对称性来存储和计算张量,存储需求减少了O(m!)倍,计算需求减少了O((m+1)!/2^m)倍,其中m是张量的阶数。然而,正如分析所示,必须谨慎选择正确的块大小,以确保实现这些存储和计算优势(特别是对于低阶张量)。实现表明,存储大大减少,并且按块存储和计算张量引入的复杂性是可控的。初步结果表明,计算时间也减少了。本文最后讨论了本文的见解如何为将线性代数库领域的最新进展推广到多线性计算领域提供了机会。
英文摘要:
Symmetric tensor operations arise in a wide variety of computations. However, the benefits of exploiting symmetry in order to reduce storage and computation is in conflict with a desire to simplify memory access patterns. In this paper, we propose a blocked data structure (Blocked Compact Symmetric Storage) wherein we consider the tensor by blocks and store only the unique blocks of a symmetric tensor. We propose an algorithm-by-blocks, already shown of benefit for matrix computations, that exploits this storage format by utilizing a series of temporary tensors to avoid redundant computation. Further, partial symmetry within temporaries is exploited to further avoid redundant storage and redundant computation. A detailed analysis shows that, relative to storing and computing with tensors without taking advantage of symmetry and partial symmetry, storage requirements are reduced by a factor of $ O\left( m! \right)$ and computational requirements by a factor of $O\left( (m+1)!/2^m \right)$, where $ m $ is the order of the tensor. However, as the analysis shows, care must be taken in choosing the correct block size to ensure these storage and computational benefits are achieved (particularly for low-order tensors). An implementation demonstrates that storage is greatly reduced and the complexity introduced by storing and computing with tensors by blocks is manageable. Preliminary results demonstrate that computational time is also reduced. The paper concludes with a discussion of how insights in this paper point to opportunities for generalizing recent advances in the domain of linear algebra libraries to the field of multi-linear computation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。