Configurable matrix multiplication device and algorithm
A matrix multiplication and matrix configuration technology, applied in the field of computing, can solve the problems of inability to dynamically adjust, increase power consumption, and inability to improve matrix operation performance, and achieve the effect of maximizing resource utilization
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] In this embodiment, any two non-single-row or single-column matrices are input to the matrix multiplication device (the main structure is as follows: figure 1 Shown) in carrying out multiplication, technical solution of the present invention is set forth in detail.
[0032] Step S1, inputting the first calculation matrix W into the first memory and inputting the second calculation matrix H into the second memory. Among them, W is a 4*7 matrix, and H is a 7*4 matrix, neither of which is a single-row and single-column matrix; see figure 2 and image 3 .
[0033] According to the size of the first calculation matrix and the second calculation matrix, the present embodiment can select 2 to 4 matrix calculation units, and can make full use of the multipliers in the selected matrix calculation units; each matrix calculation unit consists of 4 rows 4 columns of MACs; each MAC consists of 4 multipliers and 3 adders. If 2 matrix computing units are used, it is configured as...
Embodiment 2
[0041] In this embodiment, any non-single-row or single-column matrix and a single-column matrix are input into the matrix multiplication device for multiplication, and the technical solution of the present invention is described in detail.
[0042]Step S1, inputting the first calculation matrix W into the first memory and inputting the second calculation matrix H into the second memory. Among them, W is a 4*64 matrix, H is a 64*1 matrix, and H is a single-column matrix; see Figure 6 . Selected matrix calculation units P=4; each matrix calculation unit is composed of 4 rows and 4 columns of MAC; each MAC is composed of 4 multipliers and 3 adders.
[0043] Among them, the number of matrix computing units can be dynamically adjusted according to demand.
[0044] Step S2, the first storage and the second storage block W and H, respectively:
[0045]
[0046]
[0047]
[0048] Since the matrix H is a single-column matrix, according to the number of selected matrix cal...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com