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

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

A sparse matrix and dense matrix technology, applied in the field of computer application equipment, can solve the problems of increasing demand, reducing the calculation efficiency of outer product operations, and reducing the effective bandwidth of memory writing, so as to avoid the calculation of invalid values, improve the calculation efficiency and save money. Effects of invalid operations

Active Publication Date: 2021-05-14
算筹(深圳)信息科技有限公司
View PDF16 Cites 0 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
  • Novel method for solving inner product of dense matrix and sparse matrix through outer accumulation
  • Novel method for solving inner product of dense matrix and sparse matrix through outer accumulation
  • Novel method for solving inner product of dense matrix and sparse matrix through outer accumulation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0029] An embodiment, this embodiment aims to solve the problems of large amount of calculation and repetitive calculation of zero elements in solving the inner product by outer accumulation and accumulation of the sparse matrix B (KxN) and dense matrix A (MxK). For this reason, the outer accumulation of the sparse matrix B (4x3) and the dense matrix A (4x4) provided in this embodiment is the same as the background technology, and the present embodiment uses the sparse matrix B (4x3) and the dense matrix A ( 4x4) to describe the technical solution provided by this embodiment, so as to better understand the technology provided by the present invention.

[0030] First, read the sparse matrix B (4x3) and dense matrix A (4x4) of the original data, and the specific values ​​are figure 1 as shown,

[0031] Figure 4 Explain the conversion process 400 of the sparse matrix B(4x3) according to the SCSR storage method. 400 includes the sparse matrix B(4x3) 401 of the two-dimensional l...

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 field of computer application equipment, and particularly relates to a novel method for solving an inner product of a dense matrix and a sparse matrix through outer accumulation. The method comprises the following effective steps: a, reading original data of a dense matrix A (MxK) and a sparse matrix B (KxN); b, performing row-direction data compression on the sparse matrix B (KxN), and performing row-direction compression on the sparse matrix B (KxN) in a two-dimensional layout into a row-direction compressed sparse matrix B (KxN) in a one-dimensional layout; c, reading the ith column of the row-direction compressed sparse matrix B (KxN) and the ith row of the dense matrix A (MxK), and performing outer product operation to generate ci; d, accumulating the obtained outer product results to obtain an inner product of the dense matrix A (MxK) and the sparse matrix B (KxN); wherein in the step b, aiming at the compression characteristic of the sparse matrix B (KxN), a first element value of a starting point of each row is reserved, whether the element value is zero or not is judged according to whether a non-starting-point element of each row is zero or not, whether the element value is zero or not is judged to be reserved or not, if the element value is zero, the element value is discarded, If the element value is non-zero, the element value is reserved.

Description

technical field [0001] The invention belongs to the field of computer application equipment, and in particular relates to a novel method for solving inner products of dense matrices and sparse matrices through accumulation and 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. The inner product multiplication of dense matrix A (MxK) and sparse matrix B (KxN) is a common matrix inner product calculation scenario. [0003] The dense matrix A(MxK) and the sparse matrix B(KxN) are characterized in that the sparse matrix B(KxN) has a certain amount of zero elements. This part of zero elements can not participate in the calculation and still ensure the correctness of the calculation results. At the same time, if the zero elements are directly abandoned for storage, the memory utilization efficiency can also be improved. [0004] However...

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): 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