Sparse matrix data storage method based on ground power unit (GPU)

A data storage and sparse matrix technology, which is applied in the field of GPU-based sparse matrix data storage, can solve problems such as waste of computing resources and load imbalance, and achieve the effect of reducing the range of line length changes, avoiding thread idling, and reducing reduction steps

Inactive Publication Date: 2012-05-02
HUAZHONG UNIV OF SCI & TECH
View PDF3 Cites 31 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of this, the object of the present invention is to provide a sparse matrix data storage method based on GPU, which adopts a storage strategy of segmented row merging, w

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
  • Sparse matrix data storage method based on ground power unit (GPU)
  • Sparse matrix data storage method based on ground power unit (GPU)
  • Sparse matrix data storage method based on ground power unit (GPU)

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0016] The present invention will be further described in detail below with reference to the drawings and examples.

[0017] Such as figure 1 As shown, the method for generating the data storage format SC-CSR of the present invention is:

[0018] (1) The CPU reads the matrix file and converts it into a sparse row compression format;

[0019] (2) Calculate the number of non-zero elements in each row in the sparse row compression format, and store them in the array length[];

[0020] (3) Sort the array length[] in ascending order;

[0021] (4) Divide the array length[] into [0, 8), [8, 16), [16, 32), [32, + according to the number of non-zero elements in each row of the array length[] ∞) Four segments;

[0022] (5) Set the counter i=0, and initialize the array c[4]={32, 16, 8, 4};

[0023] (6) Determine whether the number of rows contained in the i-th segment divided by c[i] is greater than the GPU full-load operation threshold, if not, go to step (7), if yes, go to step (10);

[0024] (7...

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 sparse matrix data storage method based on a ground power unit (GPU). The method comprises the following steps of: 1), sequencing the line length array length [] according to ascending order; 2), classifying the array length [] into four sections of [0, 8), [8, 16), [16, 32), [32, +infinity) according to the number of every line of non-zero element; respectively combining the 32nd, 16th, 8th, 4th lines in every section; 3], zeroizing the line in every data section and performing the line filling operation on every data section, wherein the element of the filled line is zero completely; 4], generating three one-dimensional arrays of cval [], ccol_ind [], crow_ptr [] of the SC-CSR format. In the method of the invention, the line length change amplitude of every line is reduced via segment treatment, thereby reducing the load unbalance between the thread bunch and the thread block; the adjacent lines are staggered and combined to avoid the resource waste of the thread bunch calculation when the non-zero element is less than 32, and to improve the efficiency of joint access of the CUDA display memory and decrease the step of calculating kernel and reducing lines, and therefore obviously improving the calculating performance of the vector multiplication of the sparse matrix.

Description

technical field [0001] The present invention relates to a data storage method, more specifically, the present invention relates to a GPU-based sparse matrix data storage method. Background technique [0002] In scientific computing and practical applications such as signal processing and image processing, large sparse matrices often appear. Therefore, efficient sparse matrix calculation has become an important and challenging research topic. Sparse Matrix-Vector Multiplication (SpMV for short) is the main computing operation in sparse matrix computing. Due to its extremely irregular storage access mode and the limitation of memory bandwidth during the computing process, its actual operating performance is low, which seriously affects It improves the efficiency of sparse matrix calculation and related applications. [0003] Compressed Sparse Row (CSR for short) is the most widely used sparse matrix storage format. SpMV based on CSR format and accelerated by Compute Unified...

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 HUAZHONG UNIV OF SCI & TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products