Matrix Unknit-Knit Device for Efficient Stride Convolution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing convolution operations with a stride greater than 1 in matrix processing are inefficient due to the need for extensive computing power and time, as they involve discarding pixels which wastes resources.
Innovation Solution
A convolution apparatus and method that unknits a matrix into smaller sub-matrices and unknits a convolution kernel into sub-kernels, allowing for efficient convolution operations with a stride greater than 1 by performing operations on sub-matrices with a stride of 1 and accumulating results.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a convolution operation with a stride of 2 is performed by first completing a convolution operation with a stride of 1 and then discarding 3/4 of the pixels, then the convolution operation can be completed, but computing power and time are wasted
Solution Approach 1:
The patent divides the original convolution kernel into multiple sub-kernels and divides the input matrix into multiple sub-matrices. By segmenting the convolution operation into parallel sub-operations, the system can compute only the necessary pixels for stride-2 output directly, avoiding the waste of computing discarded pixels. This segmentation allows independent processing of sub-kernels on sub-matrices, achieving both correctness and efficiency.
Solution Approach 2:
The patent performs preliminary organization of the input matrix into sub-matrices and preliminary division of the convolution kernel into sub-kernels before the actual convolution operation. This preliminary action prepares the data structure so that during the convolution process, only the necessary computations for stride-2 sampling are performed, preventing wasted computation on pixels that will be discarded.
2Reliability
If a convolution operation with a stride greater than 1 is performed by computing all pixels and then discarding some, then the operation can be completed, but time is consumed
Solution Approach 1:
The patent segments the convolution operation into multiple independent sub-operations using sub-kernels and sub-matrices. Each sub-kernel operates on corresponding sub-matrices to directly produce the sampled output pixels required for stride-2 convolution. This segmentation eliminates the need to compute and then discard unnecessary pixels, reducing processing time while maintaining correctness through systematic coverage of all required output positions.
Solution Approach 2:
The patent extracts and processes only the necessary data elements for the stride-2 convolution output. By organizing the input matrix into sub-matrices and the kernel into sub-kernels, the system extracts and computes only those pixel combinations that will contribute to the final output, excluding unnecessary computations from the start rather than removing them afterward.
3Productivity
If a convolution operation with a stride greater than 1 is performed using traditional methods, then the operation can be completed, but computational resources are wasted
Solution Approach 1:
The patent segments the convolution operation into multiple parallel sub-operations, where each sub-kernel processes a specific sub-matrix to produce a portion of the output. This segmentation enables parallel processing of independent sub-operations, increasing throughput while reducing the total quantity of computational resources required compared to the traditional approach of computing all pixels and then discarding unnecessary ones.
Solution Approach 2:
The patent performs exactly the necessary computational actions required for stride-2 convolution without over-computing. By dividing the kernel and input matrix systematically, the system performs partial actions on sub-matrices with sub-kernels that collectively produce the complete output, avoiding excessive computation on pixels that would be discarded anyway.
Data Source
AI summary
A convolution apparatus including a data memory, a matrix unknit-knit device, and a convolution operation device, a convolution method, a matrix unknit-knit device, and a matrix unknit-knit method are provided. The matrix unknit-knit device unknits a first matrix stored in the data memory into s*s second matrices (or knits the s*s second matrices into the first matrix), where s is greater than 1. Pixels in each of s*s subblocks in the first matrix serve one-to-one as pixels of the s*s second matrices. A convolution operation device unknits a convolution kernel of a convolution operation with a stride of s into s*s sub-kernels, uses any one of the sub-kernels to perform a convolution operation with a stride of 1 on one corresponding second matrix, and accumulates the operation results the second matrices as the operation result of performing the convolution operation with a stride of s on the first matrix.


