Matrix Transformation Circuit Using Cyclic Shift and Cache Reordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional matrix transformation schemes in deep learning accelerators are inefficient, consuming excessive resources and lacking flexibility, particularly in supporting multiple matrix transformations like transposition of multi-dimensional matrices, due to their reliance on software preprocessing and register array-based methods.

Innovation Solution

A hardware-based matrix transformation apparatus that includes a first shift unit for cyclic shifting of matrix data, a cache unit for reordering data, and a second shift unit for further cyclic shifting, enabling efficient transformation of multi-dimensional matrices with characteristics of streaming, simple circuit design, and low power consumption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If software preprocessing and register array-based methods are used for matrix transformation, then flexibility is reduced and resource consumption increases, but implementation simplicity is maintained

Engineering Contradiction:
ImproveflexibilityVSAvoidcircuit complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The matrix transformation is divided into multiple stages: first cyclic shift, then cache storage with reordering, and second cyclic shift. Each stage handles a specific aspect of the transformation, allowing the system to support multiple transformation types through coordinated operation of these segmented units rather than requiring a single complex universal unit.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The combination of cyclic shift units and cache unit with reordering capability creates a multi-functional transformation apparatus that can perform various matrix transformations (transposition, dimension expansion, etc.) using the same hardware components, eliminating the need for separate dedicated circuits for each transformation type.

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

2Quantity of substance

If conventional matrix transformation schemes are used, then resource consumption is excessive, but transformation capability is achieved

Engineering Contradiction:
Improveresource consumptionVSAvoidtransformation efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The invention extracts and isolates the essential operations needed for matrix transformation into dedicated hardware units (cyclic shift units and cache unit with reordering), removing unnecessary overhead from software preprocessing and general-purpose register operations, thereby reducing resource consumption while maintaining transformation capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The cache unit serves as an intermediary between the first and second cyclic shift units, providing temporary storage with reordering capability. This intermediary structure enables efficient data flow and transformation without requiring excessive resources from either shift unit alone.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If hardware-based transformation with multiple units is implemented, then circuit complexity increases, but transformation flexibility improves

Engineering Contradiction:
Improvetransformation flexibilityVSAvoidcircuit complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The transformation apparatus uses dynamic control signals to configure the operation of cyclic shift units and cache unit based on the required transformation type. This dynamic reconfigurability provides flexibility for multiple transformation operations without requiring physically different circuit configurations for each transformation type.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentEP3757821A1Apparatus and method for transforming matrix, and dataprocessing system
Publication Date: 2020.12.30 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • EP3757821A1 patent drawingFigure 1
  • EP3757821A1 patent drawingFigure 2A~2C(b)
  • EP3757821A1 patent drawingFigure 3

AI summary

Disclosed are an apparatus and method for transforming a matrix, and a data processing system. The apparatus may include: a first shift unit, configured to receive matrix data and perform first cyclic shift on the matrix data to generate first data; a cache unit, configured to write each row of data into the cache unit in the first data thereto in an order different from the order of respective data in the row of data to store the first data as second data; and a second shift unit, configured to read the second data from the cache unit and perform second cyclic shift on the second data to generate transformed matrix data.