Matrix Partitioning for Torus Computing Element Coordination
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In processors with a double torus structure, simultaneous processing of the same submatrix in multiple computing elements can lead to waiting times, hindering efficient calculation of matrix products due to overlapping submatrix usage.
Innovation Solution
The method involves generating partitioned matrices by the least common multiple of the number of computing elements in the row and column directions, storing them in a manner that avoids overlapping submatrix usage across different computing elements, and transmitting and adding products in a torus-like manner to ensure efficient calculation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the same submatrix is processed simultaneously in multiple computing elements, then processing parallelism is improved, but waiting time increases due to overlapping submatrix usage
Solution Approach 1:
The patent segments the processing workflow into distinct phases: data loading phase and computation phase. During the data loading phase, submatrices are loaded into registers of computing elements. During the computation phase, these loaded submatrices are processed. This segmentation allows different computing elements to be in different phases simultaneously, eliminating waiting time while maintaining parallelism.
Solution Approach 2:
The patent implements preliminary action by pre-loading required submatrices into the registers of computing elements before the computation phase begins. This preliminary data preparation ensures that when computation starts, all necessary data is already available in local registers, eliminating the need for waiting during computation and enabling immediate parallel processing.
2Productivity
If data is shared among multiple computing elements, then memory access frequency is reduced, but coordination complexity increases
Solution Approach 1:
The patent applies local quality by organizing data storage and access according to the spatial layout of the double torus structure. Each computing element accesses data from its locally connected neighbors in the torus topology, rather than requiring global data sharing. This localized data access pattern reduces coordination complexity while maintaining the benefit of reduced memory access frequency, as data can be efficiently shared through local register exchanges along the torus connections.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A computing method includes: generating first partitioned matrices by partitioning the first matrix by a least common multiple of the M and the N in the row direction and by the N in the column direction; generating second partitioned matrices by partitioning the second matrix by the M in the row direction and by the least common multiple in the column direction; adding a first product of the first partitioned matrices and the second partitioned matrices to a first result matrix; transmitting the first partitioned matrices to computing elements directly connected to that computing element out of other computing elements connected to each other in a torus-like manner in the row direction; transmitting the second partitioned matrices to computing elements directly connected to that computing element out of other computing elements connected to each other in a torus-like manner in the column direction.