作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2018, Vol. 44 ›› Issue (8): 54-60. doi: 10.19678/j.issn.1000-3428.0048047

• 先进计算与数据处理 • 上一篇    下一篇

基于GPU的高效稀疏矩阵存储格式研究

程凯,田瑾,马瑞琳   

  1. 上海工程技术大学 电子电气工程学院,上海 201620
  • 收稿日期:2017-07-21 出版日期:2018-08-15 发布日期:2018-08-15
  • 作者简介:程凯(1993—),男,硕士研究生,主研方向为面向电磁问题的大规模并行计算;田瑾(通信作者),副教授;马瑞琳,硕士研究生。
  • 基金资助:

    上海市自然科学基金(15ZR1418900)。

Study on Efficient Storage Format of Sparse Matrix Based on GPU

CHENG Kai,TIAN Jin,MA Ruilin   

  1. College of Electronic and Electrical Engineering,Shanghai University of Engineering Science,Shanghai 201620,China
  • Received:2017-07-21 Online:2018-08-15 Published:2018-08-15

摘要:

针对基于GPU求解大规模稀疏线性方程组的问题,提出一种稀疏矩阵的存储格式HEC,并应用该格式在统一计算设备架构(CUDA)平台上实现不完全LU分解的预条件共轭梯度(ILUCG)法。该存储格式由ELL与CSR格式混合而成,将其以调用GPU kernel的方式实现ILUCG法并应用于大 型稀疏线性系统的求解中,可提高稀疏矩阵的存储效率,减少稀疏矩阵与向量乘(SpMV)的运算时间。实验结果表明,与目前广泛使用的基于CSR和HYB存储格式并调用CUSPARSE库函数的实现方式相比,该实现方式最优可得10.4%的加速效果,并且具有良好的SpMV运算性能。

关键词: 图像处理单元, CUSPARSE库, HEC存储格式, 稀疏矩阵与向量乘, 不完全LU分解, 预条件共轭梯度法

Abstract:

In order to solve large-scale sparse group of linear equations based on Graphic Processing Unit(GPU),in this paper,a storage format HEC(Hybrid ELL and CSR) of sparse matrix is proposed to solve sparse linear equations on GPU.This format is successfully used in Compute Unified Device Architecture(CUDA) to realize Incomplete LU factorization preconditioned Conjugate Gradient(ILUCG)method.It consists of ELL and CSR(Compressed Sparse Row) and is applied to solve the large sparse linear systems by calling GPU kernel in ILUCG.The storage efficiency of sparse matrices can be improved and operation time of Sparse Matrix-Vector multiplication(SpMV) can be reduced.The way by calling GPU kernel and being stored in HEC is compared with which is carried out by calling CUSPARSE library functions based on CSR and HYB(Hybrid).The result shows that the acceleration of the best available is 10.4%,and the way by using HEC storage format has good SpMV performance.

Key words: Graphic Processing Unit(GPU), CUSPARSE library, HEC (Hybrid ELL and CSR) storage format, Sparse Matrix-Vector multiplication (SpMV), incomplete LU factorization, preconditioned conjugate gradient method

中图分类号: