Sparse Matrix Transformation for High-Speed Vector Products
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for transforming sparse matrices with rows and columns containing many non-zero elements into efficient formats for high-speed calculations are inefficient, leading to difficulties in performing sparse matrix vector products.
Innovation Solution
The proposed solution involves dividing a sparse matrix into submatrices and transforming them into specific formats such as row-major dense matrix, column-major dense matrix, row-major sparse matrix compression, and column-major sparse matrix compression formats, allowing for efficient calculation of sparse matrix vector products.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If a sparse matrix with rows and columns containing many non-zero elements is divided into JDS and CRS formats, then the matrix can be stored in compression formats, but the row and column including many non-zero elements are uselessly divided, making it difficult to perform calculation at high speeds
Solution Approach 1:
The patent applies local quality by treating different regions of the sparse matrix differently. Specifically, rows and columns with many non-zero elements (dense regions) are stored in dense matrix format, while other regions are stored in compressed sparse formats (JDS/CRS). This localized differentiation optimizes both storage efficiency and calculation speed by matching the storage format to the local characteristics of each matrix region.
Solution Approach 2:
The patent segments the sparse matrix into multiple submatrices based on the distribution of non-zero elements. By identifying rows and columns with high non-zero element counts and separating them into distinct submatrices, the patent enables different storage formats to be applied to different segments, avoiding the useless division problem of uniform compression formats.
2Quantity of substance
If a sparse matrix is divided into dense submatrix and sparse submatrix, then dense submatrix can be stored efficiently, but columns with many non-zero elements are stored in linked list format, making it difficult to perform calculation at high speeds
Solution Approach 1:
The patent applies local quality by storing columns with many non-zero elements in dense matrix format rather than linked-list format. This localized treatment ensures that regions requiring high-speed access (dense columns) are stored in a format optimized for such access, while other regions use compressed formats for storage efficiency.
3Measurement precision
If learning processing of large amount of data is performed, then accurate model can be built, but calculation takes very long time
Solution Approach 1:
The patent applies parameter changes by transforming the storage format parameters of the sparse matrix based on the distribution of non-zero elements. By dynamically selecting between dense and compressed sparse formats for different submatrices, the patent optimizes the balance between calculation speed and memory usage, enabling faster learning processing without sacrificing model accuracy.
Data Source
AI summary
A first transforming unit divides a sparse matrix into a first submatrix including a row in which the number of non-zero elements is a predetermined number or more and a second submatrix including a row other than the row, and transforms the first submatrix into a row-major order dense matrix format. A second transforming unit divides the second submatrix into a third submatrix including a column in which the number of non-zero elements is a predetermined number or more and a fourth submatrix including a column other than the column, and transforms the third submatrix into a column-major order dense matrix format. A third transforming unit divides the fourth submatrix into a fifth submatrix and a sixth submatrix, and transforms the fifth submatrix into a row-major order sparse matrix compression format. A fourth transforming unit transforms the sixth submatrix into a column-major order sparse matrix compression format.


