arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1504.05022cs.MScs.DCcs.NAmath.NA
收藏

面向GPU和异构处理器的通用稀疏矩阵-矩阵乘法框架

A Framework for General Sparse Matrix-Matrix Multiplication on GPUs and Heterogeneous Processors

Niels Bohr Institute, University of Copenhagen(哥本哈根大学尼尔斯·玻尔研究所)

Weifeng Liu, Brian Vinter

AI总结:

本文提出了一种面向GPU和异构处理器的通用稀疏矩阵-矩阵乘法框架,解决稀疏矩阵乘法中的内存预分配、并行插入操作和负载均衡问题,提升性能和效率。

摘要:

通用稀疏矩阵-矩阵乘法(SpGEMM)是许多应用如代数多重网格方法(AMG)、广度优先搜索和最短路径问题的基本构建块。与其他稀疏BLAS例行程序相比,高效的并行SpGEMM实现必须处理来自三个方面额外的不规则性:(1)结果稀疏矩阵中的非零条目数量在事先未知;(2)在结果稀疏矩阵的随机位置进行并行插入操作非常耗时,主导执行时间;(3)负载平衡必须考虑输入矩阵中的稀疏数据。在本文中,我们提出了一种适用于GPU和新兴CPU-GPU异构处理器的SpGEMM框架。该框架特别关注上述三个问题。结果矩阵的内存预分配通过混合方法组织,节省了大量全局内存空间,并高效利用了非常有限的芯片内Scratchpad内存。非零条目的并行插入操作通过GPU合并路径算法实现,该算法经实验发现是最快的GPU合并方法。负载平衡基于非零条目所需算术运算的数量,并在所有阶段得到保证。与最先进的CPU和GPU SpGEMM方法相比,我们的方法在各种基准测试中乘以具有不同稀疏结构的矩阵时,提供了出色的绝对性能和相对加速。此外,在异构处理器上,我们的SpGEMM方法通过使用可重新分配的共享虚拟内存实现了更高的吞吐量。本文的工作源代码可在https://github.com/bhSPARSE/Benchmark_SpGEMM_using_CSR获取。

英文摘要:

General sparse matrix-matrix multiplication (SpGEMM) is a fundamental building block for numerous applications such as algebraic multigrid method (AMG), breadth first search and shortest path problem. Compared to other sparse BLAS routines, an efficient parallel SpGEMM implementation has to handle extra irregularity from three aspects: (1) the number of nonzero entries in the resulting sparse matrix is unknown in advance, (2) very expensive parallel insert operations at random positions in the resulting sparse matrix dominate the execution time, and (3) load balancing must account for sparse data in both input matrices. In this work we propose a framework for SpGEMM on GPUs and emerging CPU-GPU heterogeneous processors. This framework particularly focuses on the above three problems. Memory pre-allocation for the resulting matrix is organized by a hybrid method that saves a large amount of global memory space and efficiently utilizes the very limited on-chip scratchpad memory. Parallel insert operations of the nonzero entries are implemented through the GPU merge path algorithm that is experimentally found to be the fastest GPU merge approach. Load balancing builds on the number of necessary arithmetic operations on the nonzero entries and is guaranteed in all stages. Compared with the state-of-the-art CPU and GPU SpGEMM methods, our approach delivers excellent absolute performance and relative speedups on various benchmarks multiplying matrices with diverse sparsity structures. Furthermore, on heterogeneous processors, our SpGEMM approach achieves higher throughput by using re-allocatable shared virtual memory. The source code of this work is available at https://github.com/bhSPARSE/Benchmark_SpGEMM_using_CSR

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑