在灵活存储上优化张量程序
Optimizing Tensor Programs on Flexible Storage
摘要:
张量程序通常需要处理大型张量(向量,矩阵或高阶张量),这些张量需要专门的存储格式用于其内存布局。在文献中已经提出了几种这样的布局,例如坐标格式,压缩稀疏行格式和许多其他格式,这些格式专门设计用于最佳地存储具有特定稀疏属性的张量。然而,现有的张量处理系统需要专门的扩展,以便利用每一种新的存储格式。在本文中,我们描述了一个系统,允许用户定义灵活的存储格式的声明性张量查询语言,类似于张量程序所使用的语言。程序员只需要编写存储映射,它以声明的方式描述张量在主存中的布局。然后,我们描述了一个基于成本的优化器,优化张量程序的特定内存布局。我们证明经验显着的性能改进相比,最先进的张量处理系统。
英文摘要:
Tensor programs often need to process large tensors (vectors, matrices, or higher order tensors) that require a specialized storage format for their memory layout. Several such layouts have been proposed in the literature, such as the Coordinate Format, the Compressed Sparse Row format, and many others, that were especially designed to optimally store tensors with specific sparsity properties. However, existing tensor processing systems require specialized extensions in order to take advantage of every new storage format. In this paper we describe a system that allows users to define flexible storage formats in a declarative tensor query language, similar to the language used by the tensor program. The programmer only needs to write storage mappings, which describe, in a declarative way, how the tensors are laid out in main memory. Then, we describe a cost-based optimizer that optimizes the tensor program for the specific memory layout. We demonstrate empirically significant performance improvements compared to state-of-the-art tensor processing systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。