Matrix Transformation Circuit Using Cyclic Shift and Cache Reordering
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Quantity of substance
If conventional matrix transformation schemes are used, then resource consumption is excessive, but transformation capability is achieved
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.
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.
3Adaptability or versatility
If hardware-based transformation with multiple units is implemented, then circuit complexity increases, but transformation flexibility improves
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.
Data Source
Figure 1
Figure 2A~2C(b)
Figure 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.