Customized Matrix Multiplication Hardware Circuit

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current technologies face inefficiencies in performing matrix multiplication operations, particularly with large matrices, due to limitations in general-purpose processors, GPUs, and specialized devices, which result in low performance, excessive code burden, limited inter-chip communication, and inflexible matrix size support.

Innovation Solution

A device and method for executing matrix multiplication operations, featuring a customized hardware circuit with a storage unit, register unit, controlling unit, and matrix operation unit, including a Scratchpad Memory for flexible data support and optimized cache usage, allowing for efficient matrix multiplication across various sizes and formats.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If general-purpose processors are used for matrix multiplication operations, then the device can be simple and flexible, but the operation performance is low due to scalar computation limitations

Engineering Contradiction:
Improvematrix multiplication operation performanceVSAvoidprocessor architecture complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The processor is segmented into distinct functional units: a control unit for managing operations, a first register file for storing matrix data, a second register file for storing scalar data, and a functional unit for executing matrix operations. This segmentation allows parallel processing of matrix elements while maintaining architectural flexibility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The functional unit is designed to execute multiple types of operations including matrix multiplication, vector addition, and scalar operations through a unified instruction set. The register files can store different data types (matrix elements, vectors, scalars) and the same hardware structure handles various matrix dimensions and operation types, providing multi-functionality without requiring separate dedicated hardware for each operation type.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Productivity

If multiple general-purpose processors are used for concurrent execution, then operation performance can be improved, but intercommunication among processors becomes a performance bottleneck

Engineering Contradiction:
Improveconcurrent execution performanceVSAvoidintercommunication time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

Multiple processing elements are merged into a single integrated processor structure with shared control logic and unified register files. This allows concurrent matrix operations to be performed within the same processor without requiring inter-processor communication, eliminating the bottleneck of data transfer between separate processors while maintaining parallel execution capabilities.

Inventive Principle:
Principle #5Merging (Combining)

3Productivity

If GPU with small on-chip cache is used, then parallel processing capability is improved, but off-chip bandwidth becomes a main performance bottleneck due to constant transportation of off-chip data

Engineering Contradiction:
Improveparallel processing capabilityVSAvoiddata transportation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

Matrix data is pre-loaded into the first register file before the computation begins. The register file serves as a high-speed on-chip storage that holds all necessary matrix elements for the current operation, eliminating the need for repeated off-chip data access during computation. This preliminary data preparation significantly reduces data transportation time while maintaining parallel processing capability.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If specialized matrix operation device with customized register file is used, then matrix operation performance is improved, but the device is unable to flexibly support matrix operations of different lengths

Engineering Contradiction:
Improvematrix operation performanceVSAvoidmatrix size flexibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The register files are designed with dynamic sizing capabilities through configurable register allocations and flexible data width support. The control unit can dynamically adjust the number of registers used and the data width based on the specific matrix operation requirements. This dynamic configuration allows the same hardware structure to efficiently handle matrix operations of various sizes and dimensions without sacrificing performance.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentEP3451162B1Device and method for use in executing matrix multiplication operations
Publication Date: 2021.12.29 CAMBRICON TECH CO LTD
  • EP3451162B1 patent drawingFigure 1~3
  • EP3451162B1 patent drawingFigure 4
  • EP3451162B1 patent drawingFigure 5

AI summary

A device for executing a matrix multiplication operation is provided. The device for executing a matrix multiplication operation includes a storage unit, a register unit, a controlling unit, and a matrix operation unit. The storage unit is configured to store matrix data associated with a matrix operation instruction. The register unit is configured to store scalar data associated with the matrix operation instruction. The controlling unit is configured to decode the matrix operation instruction and control the operation process of the matrix operation instruction. The matrix operation unit is configured to perform a matrix multiplication operation on an inputting matrix according to the decoded matrix operation instruction. The matrix operation unit is a customized hardware circuit.