Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Data storage method for sparse matrix and method for realizing SpMV based on same

A sparse matrix and data storage technology, applied in complex mathematical operations and other directions, can solve the problems of occupying bandwidth resources, high density of non-zero elements, scattered distribution, etc., to improve operating efficiency, reduce zero element filling, and improve efficiency.

Inactive Publication Date: 2011-04-27
INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF5 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are two disadvantages of filling zero elements: accessing zero elements requires additional bandwidth resources; zero element floating-point calculations require additional computing resources
But not all matrices will have an acceleration effect after using the Cache Blocking optimization technology. R. Nishtala pointed out in 2007 that when Cache Blocking has an acceleration effect, the sparse matrix must meet the following four points at the same time: 1) x cannot be stored in the cache at all; 2) y can be stored in the cache; 3) the distribution of non-zero elements is relatively scattered; 4) the distribution density of non-zero elements is large enough, and then the acceleration effect is not obvious after using register blocks

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data storage method for sparse matrix and method for realizing SpMV based on same
  • Data storage method for sparse matrix and method for realizing SpMV based on same
  • Data storage method for sparse matrix and method for realizing SpMV based on same

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0069] A data storage method for sparse matrices, referred to as:

[0070] A. Scan the sparse matrix with the number of rows of the given column unit size mrows. When a non-zero element is scanned, store the non-zero element value of the column where the non-zero element is located in the non-zero element array val;

[0071] B. Calculate the column value difference between the column unit where the non-zero element is located and the previous column unit, judge the type of the column value difference of the non-zero element column unit, and use the column unit with the same type of column value difference as the same column group and store the column group information to index array.

[0072] Take mrows=3 as an example, figure 1 The storage diagram obtained after the sparse matrix in the storage is stored by the method of the present invention is shown in Figure 5 , when non-zero elements 1 and 3 appear in the scan, store 1 and 3 in the array val, but since there are only t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a data storage method for a sparse matrix and a method for realizing sparse matrix-vector multiply (SpMV) based on the same. The data storage method comprises the following steps of: A, scanning the sparse matrix according to the line number with preset queue unit size, and storing a non-zero element value of a line of a non-zero element into a non-zero element array val when the non-zero element is scanned; and B, calculating a queue value difference, judging the type of the queue value difference of the non-zero element queue unit, taking the queue units with the same queue value difference type as the same queue group, and storing the queue group information to an index array. The method for realizing the SpMV comprises the following steps of: 1) calculating the queue value of the queue unit according to the queue value difference type; 2) reading a corresponding x variable according to the queue value, and multiplying the corresponding x variable by an element in the val; 3) accumulating a result which is calculated by each queue unit in the queue group, and saving in a result array; and 4) continuously reading the queue value difference type of the next queue group. By the method, zero element filling is reduced, and operation of realizing the SpMV and operation efficiency of storing access operation are improved.

Description

technical field [0001] The invention relates to a data storage method and a SpMV realization method for improving the performance of sparse matrix-vector multiplication. Background technique [0002] Sparse matrix-vector multiplication (SpMV, y=Ax) is a very important calculation kernel that is often called in large numbers, and is widely used in scientific computing, information retrieval, meteorology, aerospace, reservoir simulation, astrophysics, data mining and other sciences. In computing and practical applications, the number of repeated calls often reaches tens of thousands of times. However, on modern computing platforms based on Cache storage levels, the operating efficiency of sparse matrix-vector multiplication stored in traditional CSRs is often lower than 10% of the peak value of hardware floating-point operations. Optimizing the performance of sparse matrix-vector multiplication can greatly improve the operating efficiency of the entire engineering calculation...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/16
Inventor 孙相征张云泉王婷刘芳芳袁良
Owner INST OF SOFTWARE - CHINESE ACAD OF SCI
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products