表达稀疏矩阵计算在空间结构上的生产性能
Expressing Sparse Matrix Computations for Productive Performance on Spatial Architectures
摘要:
本文讨论了空间规划的稀疏矩阵计算的生产性能。挑战在于如何以规则的方式表达不规则的计算及其优化。稀疏矩阵具有(非零)值和结构。在本文中,我们建议将稀疏矩阵上的计算的实现分为两类:(1)结构驱动或自上而下的方法,其遍历具有给定行和列索引的结构并定位对应的值,以及(2)值驱动或自下而上的方法,其加载并处理并行流中的值,并解码值的对应行和列索引的结构。在像FPGA这样的空间架构中,价值驱动的方法是标准。我们展示了如何表达稀疏矩阵计算及其优化值驱动的实现。编译器自动合成代码以解码该结构。通过这种方式,程序员专注于优化值的处理,使用熟悉的密集矩阵优化,而将复杂的不规则结构遍历留给自动编译器。我们还试图正则化的减少值的动态数量,这是常见的稀疏矩阵计算的优化。
英文摘要:
This paper addresses spatial programming of sparse matrix computations for productive performance. The challenge is how to express an irregular computation and its optimizations in a regular way. A sparse matrix has (non-zero) values and a structure. In this paper, we propose to classify the implementations of a computation on a sparse matrix into two categories: (1) structure-driven, or top-down, approach, which traverses the structure with given row and column indices and locates the corresponding values, and (2) values-driven, or bottom-up, approach, which loads and processes the values in parallel streams, and decodes the structure for the values' corresponding row and column indices. On a spatial architecture like FPGAs, the values-driven approach is the norm. We show how to express a sparse matrix computation and its optimizations for a values-driven implementation. A compiler automatically synthesizes a code to decode the structure. In this way, programmers focus on optimizing the processing of the values, using familiar optimizations for dense matrices, while leaving the complex, irregular structure traversal to an automatic compiler. We also attempt to regularize the optimizations of the reduction for a dynamic number of values, which is common in a sparse matrix computation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。