Matrix Unit Stencil Computation for Efficient HPC Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current stencil computation methods in high performance computing (HPC) applications, such as image processing and differential equation solving, are inefficient when implemented using vector units, as they do not fully utilize the capabilities of existing matrix operations.

Innovation Solution

Convert stencil computations into matrix operations, specifically inner and outer product operations, using a matrix unit like a scalable matrix element (SME) to improve efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If stencil computation is implemented using vector units, then the computation can be performed, but the efficiency is low

Engineering Contradiction:
Improvestencil computation efficiencyVSAvoidcomputation implementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent transforms the computation parameters by converting stencil computation operations into matrix multiplication operations. This parameter change allows the same computational task to be executed using matrix units instead of vector units, fundamentally changing how the computation is performed to achieve higher efficiency

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent substitutes the vector unit execution mechanism with a matrix unit execution mechanism. By replacing the mechanical system of vector-based stencil computation with matrix-based computation, the patent leverages the inherent parallelism and efficiency of matrix units to resolve the efficiency problem

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If vector operations are used for stencil computation, then the computation can be completed, but a large quantity of vector operations are required

Engineering Contradiction:
Improvecomputation speedVSAvoidcomputation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent merges multiple vector operations into a single matrix multiplication operation. By combining numerous individual vector computations into one unified matrix operation, the patent reduces the total number of operations required and eliminates the time loss associated with executing a large quantity of separate vector operations

Inventive Principle:
Principle #5Merging (Combining)

3Measurement precision

If stencil computation is performed by traversing each data point, then the computation is accurate, but the efficiency needs to be improved

Engineering Contradiction:
Improvecomputation accuracyVSAvoidcomputation efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent transitions from a one-dimensional traversal approach to a two-dimensional matrix operation approach. By changing the dimensionality of the computation from sequential vector processing to parallel matrix processing, the patent maintains computational accuracy while dramatically improving efficiency through the simultaneous processing of multiple data points

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

Data Source

PatentUS20250245126A1Stencil computation method and apparatus
Publication Date: 2025.07.31 HUAWEI TECH CO LTD
  • US20250245126A1 patent drawing
  • US20250245126A1 patent drawing
  • US20250245126A1 patent drawing

AI summary

A method includes: obtaining a to-be-processed data matrix of an application; converting data on which a stencil computation is to be performed in the data matrix into an inner product operation performed on a minimum data matrix and a first coefficient matrix; converting the inner product operation performed on the minimum data matrix and the first coefficient matrix into an outer product operation performed on a second coefficient matrix and the minimum data matrix, and performing the outer product operation through the matrix unit to obtain a first result matrix; and performing a trace operation on the first result matrix to obtain a result of the stencil computation. According to this application, the stencil computation can be implemented based on the matrix unit, and efficiency of performing the stencil computation by the processor can be improved.