Custom High-Performance Vector Code Generation for Data-Specific Sparse Computations
Custom High-Performance Vector Code Generation for Data-Specific Sparse Computations
复制标题
DOI:
10.1145/3559009.3569668
复制
发表时间:
2022-10
期刊:
影响因子:
--
通讯作者:
Marcos Horro;L. Pouchet;Gabriel Rodríguez;J. Touriño
中科院分区:
文献类型:
--
作者:
Marcos Horro;L. Pouchet;Gabriel Rodríguez;J. Touriño
Sparse computations, such as sparse matrix-dense vector multiplication, are notoriously hard to optimize due to their irregularity and memory-boundedness. Solutions to improve the performance of sparse computations have been proposed, ranging from hardware-based such as gather-scatter instructions, to software ones such as generalized and dedicated sparse formats, used together with specialized executor programs for different hardware targets. These sparse computations are often performed on read-only sparse structures: while the data themselves are variable, the sparsity structure itself does not change. Indeed, sparse formats such as CSR have a typically high cost to insert/remove nonzero elements in the representation. The typical use case is to not modify the sparsity during possibly repeated computations on the same sparse structure. In this work, we exploit the possibility to generate a specialized executor program dedicated to the particular sparsity structure of an input matrix. It creates opportunities to remove indirection arrays and synthesize regular, vectorizable code for such computations. But, at the same time, it introduces challenges in code size and instruction generation, as well as efficient SIMD vectorization. We present novel techniques and extensive experimental results to efficiently generate SIMD vector code for data-specific sparse computations, and study the limits in terms of applicability and performance of our techniques compared to state-of-practice high-performance libraries like Intel MKL.