In many application scenarios, the efficiency of linear operations is sensitive to the storage format of sparse matrix, and the sparse storage formats that support efficient operation of different linear operations often vary. Therefore, in order to effectively improve the performance of linear operations, efficient conversion of sparse matrix storage formats is particularly important. However, there are multiple conversion paths between the two determined storage formats. How to choose the high efficient conversion path is the focus of this paper. Therefore, this paper designs a path optimization strategy for sparse matrix storage format conversion, constructs a sparse matrix storage format conversion model, and realizes the path optimization of efficient storage format conversion based on the Dijkstra algorithm. On this basis, efficient conversion is achieved for five typical sparse storage formats: COO, CSR, ELL, DIA and BCSR. Finally, the experimental results based on two different architectures of CPU and NVIDIA GPU show that some direct conversions between sparse matrix storage formats are not the optimal conversion path, and higher conversion efficiency can be achieved by intermediate format conversion. Moreover, the experimental results demonstrate that the speedup between the proposed method under optimal conditions with the direct conversion in the format conversion can reach 119.071× on CPU and reach 60.534× on NVIDIA GPU. In the worst case, its performance is the same as that of direct conversion. This satisfies the dynamic and changeable requirements of different sparse matrix storage formats in application scenarios to a certain extent. It also effectively improves the performance of sparse matrix storage format conversion.
更多
查看译文
关键词
Sparse matrix storage format,Storage format conversion,Dijkstra algorithm