Method and device for multiplying matrix and vector

A multiplication operation and matrix technology, which is applied in the field of matrix and vector multiplication operation methods and devices, can solve the problems of low data processing efficiency, high implementation complexity, complicated operations, etc., and achieves improved scheduling convenience, reduced complexity, and reduced The effect of power consumption

Active Publication Date: 2018-10-16
HUAWEI TECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The matrix and vector operations in the prior art need to judge whether the value of the matrix element is zero in real time, and record the position of the non-zero element i

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 and device for multiplying matrix and vector
  • Method and device for multiplying matrix and vector
  • Method and device for multiplying matrix and vector

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0105] Embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.

[0106] see figure 1 , is a schematic diagram of a matrix-vector multiplication operation provided by an embodiment of the present invention. Such as figure 1 As shown, it is assumed that the matrix to be processed participating in the multiplication operation is an A*B matrix, and the input vector data participating in the multiplication operation is a B*1 vector. The above-mentioned A*B matrix is ​​multiplied by the above-mentioned B*1 vector to obtain an A*1 vector. That is, the matrix to be processed is a matrix with rows A and columns B, and the matrix to be processed includes one or more zero elements. The input vector data is a vector in column B. In the matrix-vector multiplication operation, the matrix elements of each row of the matrix are paired with the vector elements, and the two elements in each pair are multiplied,...

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

An embodiment of the invention discloses a method and a device for multiplying a matrix and a vector, the method comprises the following steps of: obtaining first indication information of a matrix element; reading a matrix element value of a non-zero element from a preset matrix according to the first indication information, and determining a first positional mark of the read matrix element value; acquiring second indication information of a vector element; reading a vector element value of a second positional mark corresponding to the first positional mark from input vector data according tothe second indication information; and obtaining a multiplication value of the matrix element value and the vector element value. By adopting the embodiment of the invention, the complexity of data processing can be reduced, the power consumption of data processing can be reduced, and the data processing efficiency can be improved.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a method and device for multiplying a matrix and a vector. Background technique [0002] Due to the excellent performance of convolutional neural networks in image recognition, image classification, audio recognition and other data processing applications, convolutional neural networks have become one of the hot topics of various academic research. However, there are a large number of floating-point number multiplication and addition operations in the convolutional neural network, including matrix and vector multiplication operations, which require a large amount of calculation and take a long time, which makes the hardware energy consumption of the convolutional neural network large. Therefore, how to reduce the amount of floating-point calculations in convolutional neural networks has become one of the current technical problems to be solved urgently. [0003] In the prior art, ...

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
CPCG06F17/16
Inventor 屠嘉晋朱凡林强刘虎
Owner HUAWEI TECH CO LTD
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