Check patentability & draft patents in minutes with Patsnap Eureka AI!

Method for solving inner product of sparse matrix and dense matrix through outer accumulation

A sparse matrix and dense matrix technology, applied in the field of outer accumulation to solve sparse matrix and dense matrix inner product, can solve the problems of reducing the effective bandwidth of memory writing, reducing the calculation efficiency of outer product operation, and increasing demand, so as to save invalid operations, The effect of improving computing efficiency and avoiding the calculation of invalid values

Pending Publication Date: 2021-05-25
算筹(深圳)信息科技有限公司
View PDF8 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in the existing outer accumulation calculation, the zero elements in the sparse matrix participate in the outer product calculation, which not only reduces the computational efficiency of the outer product operation but also increases the need to write the zero value to the memory after the outer product calculation, and then Reduced effective bandwidth for memory writes

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
  • Method for solving inner product of sparse matrix and dense matrix through outer accumulation
  • Method for solving inner product of sparse matrix and dense matrix through outer accumulation
  • Method for solving inner product of sparse matrix and dense matrix through outer accumulation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] Embodiment 1, this embodiment provides a method for solving the inner product of sparse matrix and dense matrix by external accumulation

[0030] Like the background technology, this embodiment uses sparse matrix A (4x4) and dense matrix B (4x3) to describe the technical solution provided by this embodiment, so as to better understand the technology provided by the present invention.

[0031] First, read the sparse matrix A (4x4) and dense matrix B (4x3) of the original data, and the specific values ​​are figure 1 As shown, here, for the sparse matrix A(4x4) according to Figure 4 The matrix form shown in 401 is represented, and the zero elements are represented by black squares. In this example, the row index and column index start from 0, and they can also start from 1, which does not affect the implementation of this method.

[0032] Then perform column compression on the sparse matrix A (4x4), remove the zero elements therein, as shown in 402, 402 includes three co...

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 belongs to the technical field of computer application, and particularly relates to a method for solving an inner product of a sparse matrix and a dense matrix through outer accumulation. The method comprises the steps of effective steps of firstly completing reading of original data of a sparse matrix A (MxK) and a dense matrix B (KxN); performing column-direction data compression on the sparse matrix A (MxK), and performing column-direction compression on the sparse matrix A (MxK) in the two-dimensional layout into a column-direction compressed sparse matrix A (MxK) in the one-dimensional layout; reading the outer product operation of the ith column of the column-direction compressed sparse matrix A (MxK) and the ith row of the dense matrix B (KxN) to generate ci; and accumulating the obtained outer product results to obtain the inner product of the sparse matrix A (MxK) and the dense matrix B (KxN). The original two-dimensional layout sparse matrix A (MxK) is compressed into the one-dimensional layout sparse matrix A (MxK) in the column direction, and the zero element value of the sparse matrix A (MxK) is removed, so that the calculation of invalid numerical values is avoided, the purposes of saving memory access and invalid operation are achieved, and operation efficiency is improved.

Description

technical field [0001] The invention belongs to the field of computer application technology, and in particular relates to a method for solving the inner product of a sparse matrix and a dense matrix by external accumulation. Background technique [0002] Matrix inner product multiplication is the basis of algorithms in many fields such as numerical computing, machine learning, and engineering simulation, and the inner product multiplication of sparse matrix A (MxK) and dense matrix B (KxN) is a common computing scenario. Sparse matrix A(MxK) and dense matrix B(KxN) are characterized by a certain amount of zero elements in sparse matrix A. This part of zero elements can not participate in the calculation and still ensure the correctness of the calculation results. At the same time, the storage of zero elements can be directly abandoned to improve the utilization efficiency of memory. [0003] However, in the process of calculation and storage, ignoring the zero elements in ...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F7/544G06F17/16
CPCG06F7/5443G06F17/16
Inventor 周晓辉袁博华诚
Owner 算筹(深圳)信息科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More