用于稀疏张量与张量网络收缩的最小代价循环嵌套
Minimum Cost Loop Nests for Contraction of a Sparse Tensor with a Tensor Network
AI总结:
针对稀疏张量与张量网络收缩(SpTTN)这一性能瓶颈,提出可自动识别最优循环嵌套的算法与运行时系统,支持分布式并行,性能优于通用前沿库、匹配专用代码。
摘要:
稀疏张量分解与补全广泛应用于从机器学习到计算量子化学的众多领域。通常,这类模型优化的主要瓶颈是单个大型稀疏张量与由多个稠密矩阵或张量构成的网络之间的收缩(SpTTN)。此前关于高性能张量分解与补全的研究,主要聚焦于特定SpTTN核函数的性能与可扩展性优化。我们提出了用于识别并执行任意SpTTN核函数最高效循环嵌套的算法与运行时系统。我们既考虑了用于自动调优的此类循环嵌套枚举方法,也研究了针对更简单指标(如缓冲区大小或缓存未命中模型)寻找最低代价循环嵌套的高效算法。我们的运行时系统无需用户指导即可确定最佳循环嵌套选择,还能为SpTTN核函数提供分布式内存并行化能力。我们使用真实世界张量与合成张量对框架进行了评估。结果表明,我们的方法性能优于现有的通用型前沿库,且能达到专用代码的性能水平。
英文摘要:
Sparse tensor decomposition and completion are common in numerous applications, ranging from machine learning to computational quantum chemistry. Typically, the main bottleneck in optimization of these models are contractions of a single large sparse tensor with a network of several dense matrices or tensors (SpTTN). Prior works on high-performance tensor decomposition and completion have focused on performance and scalability optimizations for specific SpTTN kernels. We present algorithms and a runtime system for identifying and executing the most efficient loop nest for any SpTTN kernel. We consider both enumeration of such loop nests for autotuning and efficient algorithms for finding the lowest cost loop-nest for simpler metrics, such as buffer size or cache miss models. Our runtime system identifies the best choice of loop nest without user guidance, and also provides a distributed-memory parallelization of SpTTN kernels. We evaluate our framework using both real-world and synthetic tensors. Our results demonstrate that our approach outperforms available generalized state-of-the-art libraries and matches the performance of specialized codes.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。