Sparse Matrix Compression for Zero-Skipping Convolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing matrix processing methods, particularly for sparse matrices, incur inefficiencies due to the need for element alignment and invalid calculations involving zero elements during convolution operations, as they require restoring zero elements to align non-zero elements from compressed matrices with different quantities.

Innovation Solution

A method that determines the quantity and position of non-zero elements in a sparse matrix, generating a distribution matrix to indicate these positions, and combining them with the non-zero elements to create a compressed matrix, allowing operations like convolution to be performed directly on the compressed matrix, thereby avoiding invalid calculations and improving efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If CSR compression is used to store sparse matrices, then storage efficiency is improved, but operation efficiency deteriorates due to the need for element alignment and invalid calculations

Engineering Contradiction:
Improvestorage efficiencyVSAvoidoperation efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments the sparse matrix into two separate components: a compressed matrix containing only non-zero elements and a distribution matrix containing only non-zero element positions. This segmentation allows operations to be performed only on meaningful data without requiring alignment of zero elements, thus resolving the contradiction between storage efficiency and operation efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the distribution matrix containing position information separately from the compressed matrix. By taking out the position information into a separate structure, the system can efficiently locate and operate only on non-zero elements during convolution operations, eliminating the need for invalid calculations on zero elements while maintaining compressed storage.

Inventive Principle:
Principle #2Taking out (Extraction)

2Measurement precision

If zero elements are restored for element alignment during convolution operations on compressed matrices, then calculation accuracy is improved, but operation efficiency deteriorates due to invalid calculations

Engineering Contradiction:
Improvecalculation accuracyVSAvoidoperation efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent performs preliminary action by pre-storing the positions of non-zero elements in the distribution matrix during the compression phase. This preliminary organization of position information allows the system to directly access and operate only on relevant non-zero elements during convolution, ensuring calculation accuracy without requiring restoration of zero elements for alignment, thus maintaining high operation efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The distribution matrix serves as an intermediary structure that bridges the compressed matrix and the convolution operation. It provides position information that guides the operation to access the correct non-zero elements from the compressed matrix, ensuring calculation accuracy without requiring the presence of zero elements for alignment, thereby avoiding invalid calculations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11250108B2Matrix processing method and apparatus, and logic circuit
Publication Date: 2022.02.15 HUAWEI TECH CO LTD
  • US11250108B2 patent drawing
  • US11250108B2 patent drawing
  • US11250108B2 patent drawing

AI summary

A matrix processing method includes: determining a quantity of non-zero elements in a to-be-processed matrix, where the to-be-processed matrix is a one-dimensional matrix; generating a distribution matrix of the to-be-processed matrix, where the distribution matrix is used to indicate a position of a non-zero element in the to-be-processed matrix; combining the quantity of non-zero elements, values of all non-zero elements in the to-be-processed matrix arranged sequentially, and the distribution matrix, to obtain a compressed matrix of the to-be-processed matrix.