Load balancing based sparse matrix LU decomposition method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI INST OF INTERCONNECT TECH CO LTD
- Filing Date
- 2023-12-28
- Publication Date
- 2026-08-07
AI Technical Summary
尤其对于Left-Looking算法来说,由于存在复杂的数据依赖关系,甚至会出现完全串行执行的情况,即列间并行度消失,算法只能逐列更新矩阵数值,此时性能难以提升,也造成大量计算资源浪费
[0033]本发明的优点:对稀疏矩阵A,基于消去树进行层级划分,以建立稀疏矩阵A的基础更新层级,也即在在符号分析的同时建立基础更新层级,可减少时间复杂度;对基础更新层级,基于ALAP调度,以得到ALAP调度后更新层级,以减少低层级规模,减少了资源冲突,提高了资源利用率;
Smart Images

Figure CN117807365B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus, particularly a sparse matrix LU decomposition method and apparatus based on load balancing, belonging to the technical field of integrated circuit electronic design automation (EDA). Background Technology
[0002] In circuit simulation, the linear equations for all devices can be abstracted and aggregated into a sparse matrix. Solving this linear equation using the sparse matrix yields voltage and current values, which are then substituted back into the model matrix to update the matrix values. This process is repeated until the solutions for voltage and current converge. For various nonlinear devices such as transistors, the Newton-Raphson iteration is required to converge the nonlinear model to a linear model. Therefore, the core of circuit simulation is solving a series of linear equations based on matrix calculations.
[0003] Generally, methods for solving sparse linear equation systems can be divided into two main categories: direct methods and iterative methods. Direct methods, based on LU decomposition, decompose the circuit matrix into a lower triangular matrix L and an upper triangular matrix U. In subsequent iterations solving different vectors, the lower triangular matrix L and the upper triangular matrix U can be reused. Therefore, although the time required for a single solution is slower than iterative methods, the overall time advantage is significantly compensated for by solving multiple solutions. Consequently, direct methods dominate in circuit simulation. Meanwhile, large-scale sparse matrix solving methods based on LU decomposition have become a performance bottleneck in circuit simulation.
[0004] LU decomposition methods for circuit matrices can be divided into two main categories according to the order of numerical updates: Left-Looking algorithms and Right-Looking algorithms. The Left-Looking algorithm proceeds from the left side of the matrix to the right, updating one column of elements in the lower triangular matrix L and the upper triangular matrix U at a time. Therefore, it is also called a column-based update algorithm. The required elements all come from the left part of the column. The dependency relationship between columns depends on the non-zero structure of the upper triangular matrix U, that is, the data dependency is relatively complex.
[0005] The Right-Looking algorithm also proceeds from left to right, but each time it updates all elements within a submatrix formed by the lower triangular matrix L and the upper triangular matrix U. Therefore, it is also called a sub-matrix-based update algorithm. Since the numerical updates within the submatrix are completely independent, it has a high degree of data parallelism.
[0006] In traditional CPU-dependent computing architectures, due to limited hardware resources, the Left-Looking algorithm, with its lower parallelism, is commonly used. This relies primarily on increasing CPU clock frequency and chip size to improve simulation performance. While the Right-Looking algorithm offers higher parallelism and is suitable for parallel architectures with numerous computing units, such as GPUs, its lower data reuse rate in intermediate results places higher demands on cache capacity, data bandwidth, and data scheduling, often resulting in lower computational efficiency compared to the Left-Looking algorithm. Therefore, current circuit simulation tools, although employing different algorithms, are generally based on the Left-Looking algorithm, using CPU parallelism to accelerate circuit simulation.
[0007] However, as the LU decomposition is performed, both algorithms exhibit a gradual decrease in parallelism. This is because both algorithms update the matrix from left to right, and the pre-sorting stage intentionally reorders the right side of the matrix into denser columns, meaning there are more non-zero elements. The denser the columns, the more data dependencies they contain. Especially for the Left-Looking algorithm, due to the complex data dependencies, it can even execute completely serially, meaning column-to-column parallelism disappears, and the algorithm can only update matrix values column by column. In this case, performance improvement is difficult, and a significant amount of computational resources are wasted.
[0008] In practical circuit simulation applications, the computational load of a massive circuit matrix far exceeds the number of hardware computing units. Therefore, how to make full use of limited computing resources and maximize the potential parallelism in the algorithm is a pressing problem that needs to be solved in sparse matrix decomposition in circuit simulation. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a sparse matrix LU decomposition method and device based on load balancing, which can improve the average utilization of hardware computing resources, reduce LU decomposition time, shorten the sparse matrix solution time, and thus accelerate the overall simulation speed.
[0010] According to the technical solution provided by this invention, a sparse matrix LU decomposition method based on load balancing is used to numerically decompose a sparse matrix A. The LU decomposition method of the sparse matrix includes:
[0011] The sparse matrix A in the circuit simulation is loaded according to the triplet format, wherein the sparse matrix A includes row vectors, column vectors and numerical vectors;
[0012] For the sparse matrix A loaded above, a hierarchical partitioning is performed based on the elimination tree to form a basic update hierarchy corresponding to the sparse matrix A after the hierarchical partitioning;
[0013] For the basic update hierarchy generated above, if the size of any hierarchy includes at least two columns of values, then all columns in the hierarchy are scheduled based on ALAP to generate an ALAP-scheduled update hierarchy after ALAP scheduling. In the ALAP-scheduled scheduling, the corresponding columns in the ALAP-scheduled hierarchy are placed in the level before the hierarchy to which the column depends.
[0014] After ALAP scheduling, the update hierarchy starts from the lowest priority level and performs numerical decomposition based on the Left-Looking algorithm. All columns within the same level are calculated in parallel, while columns in different levels are calculated according to their level priority.
[0015] After decomposition using the Left-Looking algorithm, if the remaining level size is one column, switch to the Right-Looking algorithm for numerical decomposition.
[0016] When the remaining levels are all of one column size, the row and column coordinates of all non-zero elements in each column are considered as a submatrix.
[0017] When performing numerical decomposition using the Right-Looking algorithm, the row coordinates of non-zero elements are incremented, and all non-zero elements in a submatrix are updated each time.
[0018] When performing hierarchical partitioning based on elimination trees, the loaded sparse matrix A is first pre-sorted and symbolically analyzed. The pre-sorting of sparse matrix A includes:
[0019] Determine the permutation matrix of the sparse matrix A;
[0020] The determined permutation matrix is multiplied by the sparse matrix A to sort the sparse matrix A after multiplication, and the sorted matrix A' is generated.
[0021] When determining the permutation matrix of a sparse matrix A, the determination method includes using the maximum intercept method HSL MC64 algorithm and the approximate minimum degree permutation method.
[0022] After pre-sorting, when performing symbolic analysis on the sparse matrix A', the symbolic analysis includes:
[0023] For the pre-sorted sparse matrix A', the non-zero structure of the sparse matrix A' is analyzed column by column from left to right based on the Left-Looking algorithm to obtain the upper triangular matrix U and the lower triangular matrix L;
[0024] For an upper triangular matrix U, extract the row coordinates of the non-zero elements in each column of the upper triangular matrix U. n And find the row coordinates of the non-zero elements in the dependent column based on it.x ;
[0025] The row coordinates of the fill element are obtained by taking the difference between the set of row coordinates of the current column and the set of row coordinates of the dependent columns.
[0026] For fill elements, repeat the above process, continuing to find dependent columns and new fill elements based on the row coordinates of the fill elements to complete the symbol analysis.
[0027] Using the non-zero structure of the obtained upper triangular matrix U, the matrix dependencies are established column by column;
[0028] Based on the non-zero structure of each column, the directed connection relationships between columns are determined. The number of non-zero elements is used as the in-degree of that column. The entire upper triangular matrix U is traversed using a depth-first search algorithm to build the elimination tree of the matrix.
[0029] The update hierarchy is divided based on the elimination tree to generate the basic update hierarchy.
[0030] After ALAP scheduling, the total number of updated levels is consistent with the total number of updated levels.
[0031] A load-balanced sparse matrix LU decomposition device includes a decomposition processor, wherein,
[0032] For the sparse matrix A in the circuit simulation, the decomposition processor uses the LU decomposition method described above to perform numerical decomposition.
[0033] The advantages of this invention are: for a sparse matrix A, hierarchical partitioning is performed based on the elimination tree to establish the basic update hierarchy of the sparse matrix A, that is, the basic update hierarchy is established at the same time as symbolic analysis, which can reduce time complexity; for the basic update hierarchy, ALAP scheduling is used to obtain the update hierarchy after ALAP scheduling, which reduces the size of the lower level, reduces resource conflicts, and improves resource utilization.
[0034] The ALAP scheduling-based update hierarchy first performs numerical decomposition based on the Left-Looking algorithm, and then performs numerical decomposition based on the Right-Looking algorithm. Without introducing additional resource conflicts, it improves the average utilization of hardware resources, shortens the sparse matrix solution time, and thus speeds up the overall simulation. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of one embodiment of the present invention after performing symbolic analysis on the sparse matrix A'.
[0036] Figure 2 This is a schematic diagram of one embodiment of the basic update hierarchy of the present invention.
[0037] Figure 3This is a schematic diagram of an embodiment of the ALAP scheduling update hierarchy of the present invention.
[0038] Figure 4 This is a flowchart of one embodiment of the LU decomposition of the present invention. Detailed Implementation
[0039] The present invention will be further described below with reference to specific accompanying drawings and embodiments.
[0040] To reduce LU decomposition time and shorten the sparse matrix solution time, in one embodiment of the present invention, a LU decomposition method for a sparse matrix based on load balancing is used to numerically decompose a sparse matrix A. The LU decomposition method for the sparse matrix includes:
[0041] The sparse matrix A in the circuit simulation is loaded according to the triplet format, wherein the sparse matrix A includes row vectors, column vectors and numerical vectors;
[0042] For the sparse matrix A loaded above, a hierarchical partitioning is performed based on the elimination tree to form a basic update hierarchy corresponding to the sparse matrix A after the hierarchical partitioning;
[0043] For the basic update hierarchy generated above, if the size of any hierarchy includes at least two columns of values, then all columns in the hierarchy are scheduled based on ALAP to generate an ALAP-scheduled update hierarchy after ALAP scheduling. In the ALAP-scheduled scheduling, the corresponding columns in the ALAP-scheduled hierarchy are placed in the level before the hierarchy to which the column depends.
[0044] After ALAP scheduling, the update hierarchy starts from the lowest priority level and performs numerical decomposition based on the Left-Looking algorithm. All columns within the same level are calculated in parallel, while columns in different levels are calculated according to their level priority.
[0045] After decomposition using the Left-Looking algorithm, if the remaining level size is one column, switch to the Right-Looking algorithm for numerical decomposition.
[0046] Figure 4 The diagram illustrates a flowchart of an embodiment for performing LU decomposition on a sparse matrix. As shown in the diagram, LU decomposition requires first loading the sparse matrix A from the circuit simulation. The sparse matrix A is in triplet format, i.e. Figure 4 In the COO format, when the sparse matrix A is in triplet format, the sparse matrix A includes row vectors, column vectors, and numerical vectors. The sparse matrix A is generally related to the circuit simulation situation. As can be seen from the above description, the way and process of obtaining the sparse matrix A in circuit simulation and loading the sparse matrix A in triplet format can be consistent with the existing methods.
[0047] For the loaded sparse matrix A, a hierarchical partitioning based on a elimination tree can be performed to obtain the basic update hierarchy corresponding to the sparse matrix A after the hierarchical partitioning. The following section combines... Figure 1 and Figure 4 The method and process for generating the basic update level corresponding to the sparse matrix A are explained.
[0048] In one embodiment of the present invention, when performing hierarchical partitioning based on the elimination tree, the loaded sparse matrix A is first pre-sorted and symbolically analyzed sequentially. The pre-sorting of the sparse matrix A includes:
[0049] Determine the permutation matrix of the sparse matrix A;
[0050] The determined permutation matrix is multiplied by the sparse matrix A to sort the sparse matrix A after multiplication, and the sorted matrix A' is generated.
[0051] In specific implementation, when determining the permutation matrix of the sparse matrix A, the determination method includes using the maximum intercept method (HSL MC64 algorithm) and the approximate minimum degree permutation method, wherein... Figure 4 The MC64 algorithm in the text is the HSL MC64 algorithm, and the AMD (Approximate Minimum Degree) algorithm is the approximate minimum degree permutation method. The process of determining the permutation matrix of the sparse matrix A using the HSL MC64 algorithm and the approximate minimum degree permutation method is consistent with the existing methods.
[0052] After determining and generating the permutation matrix, matrix multiplication, a common technique in this field, can be used to operate on the sparse matrix A and then sort it, thereby generating a sparse matrix A' corresponding to the sparse matrix A. In practice, other techniques can also be used to sort the sparse matrix A, meaning the method for generating the sparse matrix A' can be selected as needed, with the specific method being the one that can sort and generate the sparse matrix A'.
[0053] In one embodiment of the present invention, after pre-sorting, when performing symbolic analysis on the sparse matrix A', the symbolic analysis includes:
[0054] For the pre-sorted sparse matrix A', the non-zero structure of the sparse matrix A' is analyzed column by column from left to right based on the Left-Looking algorithm to obtain the upper triangular matrix U and the lower triangular matrix L;
[0055] For an upper triangular matrix U, extract the row coordinates of the non-zero elements in each column of the upper triangular matrix U. n And find the row coordinates of the non-zero elements in the dependent column based on it. x ;
[0056] Take the difference set of the row coordinates of the current column and the dependent columns to obtain the row coordinates of the filled elements;
[0057] For the filled elements, repeat the above process, continue to search for the dependent columns and new filled elements according to the row coordinates of the filled elements, and complete the symbol analysis.
[0058] After generating the sparse matrix A' in the above manner, the sparse matrix A' can be processed based on the Left-Looking algorithm to obtain the upper triangular matrix U and the lower triangular matrix L. Of course, other methods can also be used, specifically based on the ability to generate the upper triangular matrix U and the lower triangular matrix L.
[0059] Figure 1 In is an embodiment after performing symbol analysis on the sparse matrix A'. In the figure, the positions where the hollow circles are located are the filled elements, and the positions where the solid circles are located are the original non-zero elements in the sparse matrix A'.
[0060] In an embodiment of the present invention, utilize the non-zero structure of the obtained upper triangular matrix U, and establish the dependency relationship of the matrix column by column;
[0061] Determine the directed connection relationship between columns according to the non-zero structure of each column, use the number of non-zero elements as the in-degree of this column, and traverse the entire upper triangular matrix U through the depth-first algorithm to establish the elimination tree of the upper triangular matrix U.
[0062] Update the level division according to the elimination tree to generate the basic update level.
[0063] Figure 4 In, after performing symbol analysis on the sparse matrix A', traverse the upper triangular matrix U using depth-first search to establish the elimination tree of the upper triangular matrix U. After performing the update level division, the basic update level can be generated.
[0064] For the non-zero structure of the upper triangular matrix U, establish the dependency relationship of the upper triangular matrix U column by column. For example, perform numerical decomposition on an element in the i-th column. If its input comes from an element in the j-th column (j < i), then the i-th column depends on the j-th column. When taking the difference set of the row coordinates of the current column and the dependent columns to determine the row coordinates of the filled elements, take Figure 1 as an example, the row coordinate set S2 of the 2nd column = {2, 5}, the row coordinate set S3 of the 3rd column = {2, 3, 7}. Since the 3rd column depends on the 2nd column, calculate the difference set S2 - S3 = {5}, so the position of the filled element is the 5th row of the 3rd column. The specific method and process for determining the row coordinates of the filled elements can be referred to the description here, which is specifically consistent with the existing ones and will not be listed one by one.
[0065] Specifically, the directed connections between columns are determined based on the non-zero structure of each column. The number of non-zero elements is used as the indegree of that column. By traversing the entire upper triangular matrix U using a depth-first search algorithm, a elimination tree for the upper triangular matrix U can be constructed. The elimination tree is then used to update the level division, i.e., the column priority of the numerical decomposition. The method of traversing the entire upper triangular matrix U using a depth-first search algorithm and the method of constructing the elimination tree are consistent with existing methods.
[0066] In practice, within the entire sparse matrix A' after the analysis, the priority of each column is determined. If there are no non-zero elements except for the diagonal elements, it means that the column does not need to be numerically decomposed, and the current column belongs to Level 0. If only the upper triangular matrix U has no non-zero elements, the in-degree is 0, which means that the numerical decomposition of the column does not depend on other columns, and it belongs to Level 1.
[0067] Based on the column coordinate value with an in-degree of 0, find the same value in the row coordinate values of other columns, for example... Figure 1 The in-degree of column 2 is 0, and the in-degrees of columns 3, 4, and 6 are 1, 1, and 3 respectively. A non-zero element with row coordinate 2 can be found in these columns. Then, the in-degree of the corresponding column is reduced by 1. Then, all columns with an in-degree of 0 are set as Level 2, i.e., columns 3 and 4 are Level 2. This process is repeated to continuously set columns with an in-degree of 0 as higher levels. Finally, the update level is established. The specific method and process of dividing the levels according to the elimination tree and establishing the basic update level are consistent with the existing method.
[0068] Figure 2 The figure illustrates one embodiment of a basic update hierarchy. The basic update hierarchy has 6 levels, namely Level 0 to Level 6. Among them, Level 0 has the lowest priority and Level 6 has the highest priority. The priority of the remaining levels gradually increases from Level 0 to Level 6. Figure 2 In the diagram, the number inside the circle is the column number of the upper triangular matrix U. For example, ⑩ in Level 0 is the 10th column of the upper triangular matrix U. Other cases can be referred to here for explanation, and will not be explained one by one.
[0069] In one embodiment of the present invention, for the basic update hierarchy generated above, if the size of any hierarchy includes at least two columns of values, then all columns within the hierarchy are scheduled based on ALAP to generate an ALAP-scheduled update hierarchy after ALAP scheduling.
[0070] Figure 2In this context, both Level 1 and Level 2 contain at least two columns of values. Level 1 contains columns ①, ②, and ⑦, while Level 2 contains columns ③ and ④. Therefore, ALAP (As late aspossible) scheduling requires scheduling both Level 1 and Level 2. Figure 2 Each of the Level 0, Level 3 to Level 6 in the system contains only one column of values, therefore, no ALAP scheduling is required.
[0071] Specifically, when using ALAP scheduling, the corresponding column within the ALAP scheduling hierarchy is placed at the level preceding the hierarchy to which the column depends; for example... Figure 2 Column 4 in Level 2 was Figure 2 The dependencies of ⑧ within Level 5 will, during ALAP scheduling, be... Figure 2 Column ④ in Level 2 is shifted to Level 4. Similarly, as... Figure 2 Column 7 in Level 1 is Figure 2 The dependencies of ⑧ within Level 5 will, during ALAP scheduling, be... Figure 2 Column 7 in Level 1 is modulated to Level 4 in Figure 4. Therefore, we can obtain... Figure 3 The ALAP scheduling update hierarchy is performed after the ALAP scheduler.
[0072] In practice, when performing ALAP scheduling on the basic update levels, the levels are generally traversed in ascending order of priority. During traversal, ALAP scheduling is performed only when it is determined that a level contains at least two columns of values, until all levels have been traversed. As explained above, after ALAP scheduling, the total number of update levels is consistent with the total number of update levels. Figure 2 The basic update hierarchy in the system includes six levels. Figure 3 The ALAP scheduling update hierarchy also has six levels.
[0073] As explained above, ALAP scheduling of the basic update level primarily aims to minimize the size of lower-level columns within that level. After generating the ALAP schedule, the update level starts from the lowest priority level and performs numerical decomposition based on the Left-Looking algorithm, such as... Figure 3The ALAP scheduling in the algorithm updates the hierarchy. Based on hierarchy priority, Level 1 is first decomposed using the Left-Looking algorithm, followed by Level 4. The method and process of the Left-Looking algorithm-based numerical decomposition can be consistent with existing methods. Furthermore, all columns within the same hierarchy are computed in parallel. For example, for Level 1, columns ① and ② are computed in parallel; for Level 4, columns ⑥, ④, and ⑦ are computed in parallel. In practice, during parallel computation, columns within the same hierarchy can be assigned to computing units within CPU cores for parallel computation. The specific method and process of executing parallel computation can be consistent with existing methods.
[0074] In one embodiment of the present invention, when the size of the remaining levels is a single column, the row coordinates and column coordinates of all non-zero elements in each column are regarded as a submatrix.
[0075] When performing numerical decomposition using the Right-Looking algorithm, the row coordinates of non-zero elements are incremented, and all non-zero elements in a submatrix are updated each time.
[0076] Depend on Figure 3 , Figure 4 As explained above, after obtaining the ALAP schedule and updating the hierarchy, for hierarchies containing two columns, numerical decomposition is first performed based on the Left-Looking algorithm. For example, first... Figure 3 The Level 1 and Level 4 layers are sequentially decomposed using the Left-Looking algorithm. As the decomposition progresses level by level, the layer size gradually decreases. At this point, the remaining Level 0, Level 2, Level 3, Level 5, and Level 6 each contain a single column. All remaining columns that have not been decomposed are then analyzed, and the row and column coordinates of all non-zero elements in each column are considered as a submatrix. In other words, in a circuit matrix, which typically consists of dense columns, the row and column coordinates of all non-zero elements are treated as a submatrix.
[0077] For the resulting dense submatrices, the Right-Looking algorithm can be used for numerical decomposition. In this algorithm, the row coordinates of the non-zero elements are incremented, and all non-zero elements within a submatrix are updated in increments. Figure 1For example, the submatrix composed of columns 5, 6, 8, and 9 is updated 7 times in total, with the row coordinates of the non-zero elements in the submatrix increasing sequentially from 2 to 8. Moreover, the numerical decomposition of all non-zero elements in each update is completely independent, and it can be distributed to different computing cores of the CPU on a column-by-column basis, which means that parallel updates can be performed.
[0078] Once the Right-Looking algorithm is used for numerical decomposition, the LU decomposition of the sparse matrix A is complete.
[0079] In summary, a sparse matrix LU decomposition device based on load balancing can be obtained. In one embodiment of the present invention, a decomposition processor is included, wherein...
[0080] For the sparse matrix A in the circuit simulation, the decomposition processor uses the LU decomposition method described above to perform numerical decomposition.
[0081] As can be seen from the above description, the decomposition processor can use existing commonly used CPU cores. The specific form of the CPU core can be selected as needed. The method and process of the decomposition processor performing LU decomposition on the sparse matrix A can be referred to the above description, and will not be repeated here.
[0082] This invention performs hierarchical partitioning of a sparse matrix A based on an elimination tree to establish a basic update hierarchy for the sparse matrix A. That is, the basic update hierarchy is established simultaneously with symbolic analysis, which can reduce time complexity. For the basic update hierarchy, ALAP scheduling is used to obtain the update hierarchy after ALAP scheduling, which reduces the size of the lower hierarchy, reduces resource conflicts, and improves resource utilization.
[0083] The ALAP scheduling-based update hierarchy first performs numerical decomposition based on the Left-Looking algorithm, and then performs numerical decomposition based on the Right-Looking algorithm. Without introducing additional resource conflicts, it improves the average utilization of hardware resources, shortens the sparse matrix solution time, and thus speeds up the overall simulation.
Claims
1. A sparse matrix LU decomposition method based on load balancing, characterized in that, The LU decomposition method for numerically decomposing a sparse matrix A includes: The sparse matrix A in the circuit simulation is loaded according to the triplet format, wherein the sparse matrix A includes row vectors, column vectors and numerical vectors; For the sparse matrix A loaded above, a hierarchical partitioning is performed based on the elimination tree to form a basic update hierarchy corresponding to the sparse matrix A after the hierarchical partitioning; For the basic update hierarchy generated above, if the size of any hierarchy includes at least two columns of values, then all columns in the hierarchy are scheduled based on ALAP to generate an ALAP-scheduled update hierarchy after ALAP scheduling. In the ALAP-scheduled scheduling, the corresponding columns in the ALAP-scheduled hierarchy are placed in the level before the hierarchy to which the column depends. After ALAP scheduling, the update hierarchy starts from the lowest priority level and performs numerical decomposition based on the Left-Looking algorithm. All columns within the same level are calculated in parallel, while columns in different levels are calculated according to their level priority. When the remaining level size is one column after decomposition using the Left-Looking algorithm, switch to the Right-Looking algorithm for numerical decomposition. When the remaining levels are all of one column size, the row and column coordinates of all non-zero elements in each column are considered as a submatrix. When performing numerical decomposition using the Right-Looking algorithm, the row coordinates of non-zero elements are incremented, and all non-zero elements in a submatrix are updated each time.
2. The sparse matrix LU decomposition method based on load balancing according to claim 1, characterized in that, When performing hierarchical partitioning based on elimination trees, the loaded sparse matrix A is first pre-sorted and sign-analyzed sequentially. The pre-sorting of sparse matrix A includes: Determine the permutation matrix of the sparse matrix A; The determined permutation matrix is multiplied by the sparse matrix A to sort the sparse matrix A after multiplication, and the sorted matrix A' is generated.
3. The sparse matrix LU decomposition method based on load balancing according to claim 2, characterized in that: When determining the permutation matrix of a sparse matrix A, the determination method includes using the maximum intercept method HSL MC64 algorithm and the approximate minimum degree permutation method.
4. The sparse matrix LU decomposition method based on load balancing according to claim 2, characterized in that, After pre-sorting, when performing symbolic analysis on the sparse matrix A', the symbolic analysis includes: For the pre-sorted sparse matrix A', the non-zero structure of the sparse matrix A' is analyzed column by column from left to right based on the Left-Looking algorithm to obtain the upper triangular matrix U and the lower triangular matrix L; For an upper triangular matrix U, extract the row coordinates of the non-zero elements in each column of the upper triangular matrix U. row n And find the row coordinates of the non-zero elements in the dependent column. row x ; The row coordinates of the fill element are obtained by taking the difference between the set of row coordinates of the current column and the set of row coordinates of the dependent columns. For fill elements, repeat the above process, continuing to find dependent columns and new fill elements based on the row coordinates of the fill elements to complete the symbol analysis.
5. The sparse matrix LU decomposition method based on load balancing according to claim 4, characterized in that, Using the non-zero structure of the obtained upper triangular matrix U, the matrix dependencies are established column by column; Based on the non-zero structure of each column, the directed connection relationships between columns are determined. The number of non-zero elements is used as the in-degree of that column. The entire upper triangular matrix U is traversed using a depth-first search algorithm to build the elimination tree of the matrix. The update hierarchy is divided based on the elimination tree to generate the basic update hierarchy.
6. The sparse matrix LU decomposition method based on load balancing according to any one of claims 1 to 5, characterized in that, After ALAP scheduling, the total number of updated levels is consistent with the total number of updated levels.
7. A sparse matrix LU decomposition device based on load balancing, characterized in that, Including a decomposition processor, among which, For the sparse matrix A in the circuit simulation, the decomposition processor performs numerical decomposition using the LU decomposition method of any one of claims 1 to 6.
Citation Information
Patent Citations
Sparse matrix LU decomposition method based on GPU
CN103399841A
GPU accelerated power flow jacobian matrix LU decomposition method
CN106157176A