Matrix Register Transpose for Fewer Instructions in Processors

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current matrix transposition methods in high-performance computing applications using scalar or vector registers are inefficient, requiring a large number of instructions and leading to low efficiency.

Innovation Solution

Utilizing a matrix register to store and read matrix data in a two-dimensional form, allowing for reduced instructions through row-by-row or column-by-column operations, thereby improving transposition efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a scalar register or vector register is used to transpose a matrix, then the transposition can be performed, but the efficiency is low due to requiring a large number of instructions

Engineering Contradiction:
Improvematrix transposition efficiencyVSAvoidnumber of instructions
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces a matrix register that stores data in a two-dimensional matrix form (N rows and M columns) rather than the traditional one-dimensional scalar or vector register storage. This dimensional change allows the processor to directly access and transpose matrix elements by switching between row-major and column-major storage layouts, reducing the number of instructions needed for matrix transposition operations

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If data is stored and accessed in traditional one-dimensional register form, then storage is simple, but matrix operations require many instructions and have low efficiency

Engineering Contradiction:
Improvematrix operation efficiencyVSAvoiddata access complexity
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The matrix register implements two-dimensional storage organization where data can be interpreted as either rows or columns depending on the operation mode. This allows efficient matrix operations by directly accessing elements in the desired dimension without requiring complex indexing instructions, thus improving ease of operation for matrix computations

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

The matrix register is designed to perform multiple functions: it can store data in row-major order for row operations, column-major order for column operations, and automatically handle transposition between these layouts. This multi-functionality eliminates the need for separate specialized registers for different matrix operations, simplifying the overall system while improving operational efficiency

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

Data Source

PatentEP4708117A1Matrix operation method, processor and computing device
Publication Date: 2026.03.11 HUAWEI TECH CO LTD
  • EP4708117A1 patent drawingFigure 1~3
  • EP4708117A1 patent drawingFigure 4~5
  • EP4708117A1 patent drawingFigure 6

AI summary

Embodiments disclosed in this application relate to the field of computing technologies, and in particular, to a matrix operation method, a processor, and a computing device. The matrix operation method is performed by a processor including a matrix register. In the matrix operation method, data of a first matrix to be transposed may be stored in the matrix register, where the first matrix includes N rows and M columns, and the matrix register stores the data of the first matrix in a two-dimensional form of N rows and M columns. Then, the data of the first matrix may be read from the matrix register in a row-by-row or column-by-column manner, to obtain data of a second matrix obtained by transposing the data of the first matrix, where the second matrix includes M rows and N columns. According to this application, matrix transpose can be completed by using a matrix register, so that efficiency of transposing a matrix can be improved.