A method for optimizing ordering parameters and scaling parameters in LU decomposition process

CN117909639BActive Publication Date: 2026-09-15SHENZHEN HUADA EMPYREAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410089673.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2026-09-15
Estimated Expiration
2044-01-22

AI Technical Summary

Benefits of technology

[0023] By selecting and determining the sorting and scaling parameters that minimize the computational cost of numerical decomposition, the LU computational cost in the transient simulation process is reduced at the cost of a smaller symbolic decomposition overhead, thereby improving LU decomposition efficiency and accelerating the simulation speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117909639B_ABST
    Figure CN117909639B_ABST
Patent Text Reader

Abstract

The application discloses a method for optimizing ordering parameters and scaling parameters in LU decomposition process, which comprises the following steps: establishing a parameter list for selecting ordering parameters and scaling parameters; traversing the parameter list according to a preset threshold of non-zero padding to perform symbolic decomposition on a sparse matrix; screening out the ordering parameters and the scaling parameters satisfying the threshold according to the number of non-zero elements and the calculation amount of the symbolic decomposition result, and updating the parameter list; finding the ordering parameters and the scaling parameters with the minimum calculation amount; and performing LU decomposition on the matrix according to the ordering parameters and the scaling parameters with the minimum calculation amount. The application screens and determines the ordering parameters and the scaling parameters with the minimum numerical decomposition calculation amount, reduces the LU calculation overhead in the transient simulation process at the cost of smaller symbolic decomposition overhead, improves the LU decomposition efficiency, and accelerates the simulation speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic design automation (EDA) circuit simulation technology, and in particular to a method for optimizing sorting parameters and scaling parameters in the LU decomposition process. Background Technology

[0002] In transient circuit simulation, a large-scale system of nonlinear equations is solved at each time point. This system is typically solved using Newton's linearized iterative method. At each Newton step, a direct method (LU decomposition) is usually used to solve the corresponding Newton equations. During the iterative solution process, the LU decomposition of the sparse matrix has the highest time complexity and is the most time-consuming part. Thus, the LU decomposition of the sparse matrix accounts for the largest proportion of the entire simulation process. Therefore, improving the efficiency of LU decomposition is key to improving simulation speed.

[0003] Currently, various ordering and scaling methods are involved in the LU decomposition process, and different ordering and scaling parameters have a significant impact on the efficiency of LU decomposition. For example, in the LU decomposition of certain sparse matrices, the non-zero padding of the ordering parameters used in the AMD algorithm and METIS (METIS is a powerful graph partitioning software package developed by Karypis Lab that can be used to compute fill-reducing orderings for sparse matrices) differs by tens of times, resulting in a large performance difference. Since the LU solution of sparse linear equation systems accounts for the largest proportion of the total circuit simulation time and has become the performance bottleneck of circuit simulation, determining the optimal ordering and scaling parameters before numerical decomposition is a key step in improving the efficiency of LU decomposition. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a method for optimizing sorting and scaling parameters in the LU decomposition process. This method employs an automatic parameter tuning strategy to determine the optimal sorting and scaling parameters before numerical decomposition, thereby reducing the overhead of LU decomposition and accelerating the simulation speed.

[0005] To achieve the above objectives, the present invention provides a method for optimizing sorting and scaling parameters in the LU decomposition process, comprising the following steps:

[0006] Create a parameter list for selecting sorting and scaling parameters;

[0007] Based on the preset non-zero padding threshold, the parameter list is traversed to perform symbolic decomposition on the sparse matrix;

[0008] Based on the symbolic decomposition results, the number of non-zero elements and the computational cost are counted, sorting parameters and scaling parameters that meet the threshold are selected, and the parameter list is updated.

[0009] Find the sorting and scaling parameters that minimize computational cost;

[0010] Perform LU decomposition on the matrix based on the sorting and scaling parameters that minimize computational cost.

[0011] Furthermore, the step of establishing a parameter list for selecting sorting parameters and scaling parameters further includes: establishing a parameter list for combinations of sorting parameters and any scaling parameters.

[0012] Furthermore, the sorting parameters include: AMD sorting, colAMD sorting, METIS sorting, and scotch sorting.

[0013] Furthermore, the scaling parameters include: no scaling, scaling by row maximum element, scaling by diagonal element, and scaling by row sum.

[0014] Furthermore, it also includes: pre-selecting suitable sorting parameters and scaling parameters from the parameter list according to the solution requirements, and updating the parameter list.

[0015] Furthermore, the step of performing symbolic decomposition on the sparse matrix by traversing the parameter list according to a preset non-zero padding threshold further includes:

[0016] Starting with the sorting and scaling parameters in the first row and first column of the parameter list, symbolic decomposition is performed on the sparse matrix in sequence. It is determined whether the symbolic decomposition corresponding to each sorting parameter and scaling parameter is successfully executed. If it is successful, the steps of counting the number of non-zero elements and computational cost based on the symbolic decomposition results, filtering out sorting parameters and scaling parameters that meet the threshold conditions, and updating the parameter list are carried out. Otherwise, the corresponding sorting parameters and scaling parameters are deleted.

[0017] Furthermore, it also includes: using the AMD algorithm or METIS to perform LU decomposition of sparse matrices.

[0018] Furthermore, the LU decomposition process includes: preprocessing and numerical decomposition.

[0019] The preprocessing includes: performing row and column swaps on the sparse matrix.

[0020] To achieve the above objectives, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the computer program stored in the memory to implement the sorting parameter and scaling parameter optimization method in the LU decomposition process as described above.

[0021] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the sorting parameter and scaling parameter optimization method in the LU decomposition process as described above.

[0022] The optimization method for sorting and scaling parameters in the LU decomposition process provided by this invention has the following advantages compared with the prior art:

[0023] By selecting and determining the sorting and scaling parameters that minimize the computational cost of numerical decomposition, the LU computational cost in the transient simulation process is reduced at the cost of a smaller symbolic decomposition overhead, thereby improving LU decomposition efficiency and accelerating the simulation speed.

[0024] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. Attached Figure Description

[0025] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0026] Figure 1 This is a flowchart of the optimization method for sorting parameters and scaling parameters in the LU decomposition process according to an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of an electronic device structure according to an embodiment of the present invention. Detailed Implementation

[0028] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0029] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.

[0030] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0031] It should be noted that the concepts of "first" and "second" may be mentioned in this invention only to distinguish different devices, components or parts, and are not used to limit the order of the functions performed by these devices, components or parts or their interdependence.

[0032] It should be noted that the terms "one" and "multiple" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more". "Multiple" should be understood as two or more.

[0033] The LU decomposition described in this article refers to decomposing an n×n square matrix A into the product of a lower triangular matrix L and an upper triangular matrix U, i.e., A = LU, where L and U are also n×n matrices. Therefore, solving the linear system of equations Ax = b (where x and b are both n-dimensional column vectors) is transformed into solving two triangular equations Ly = b and Ux = y (where y is an n-dimensional column vector).

[0034] The LU decomposition of a sparse matrix consists of two parts: preprocessing and numerical decomposition. Preprocessing involves using algorithms (including sorting and scaling methods) to perform row and column swaps on the sparse matrix to reduce computational complexity during numerical decomposition. Some preprocessing methods also incorporate pivoting (which involves swapping elements with larger absolute values ​​to the diagonal) to ensure numerical stability during decomposition. Regardless of the preprocessing method used, the preprocessed matrix is ​​simply a result of row and column swaps with no other changes.

[0035] In sparse matrix solving, a direct solution method is used, employing a left-looking LU decomposition algorithm to calculate the non-zero element patterns of new columns from left to right, using columns as the basic units. The non-zero element pattern calculations are ultimately categorized into a data structure called an Elimination Tree, where each node corresponds one-to-one with a column of the original matrix. Fill-reduce techniques are commonly used to reduce the level of the elimination tree through column swapping, thereby reducing fill-in. One fill-reduce algorithm is the Approximate Minimum Degree (AMD), which uses a greedy approach to sort nodes according to the non-zero element pattern that minimizes the current fill-in, thus reducing the overall fill-in.

[0036] Figure 1 The following is a flowchart of the optimization method for sorting parameters and scaling parameters in the LU decomposition process according to an embodiment of the present invention. Figure 1 The embodiments of the present invention will be described in further detail.

[0037] In step 101, establish the parameter list. Develop a parameter list that selects sorting and scaling parameters to establish the basic settings that meet the solution requirements. For example, the parameter list is established as follows:

[0038] O1S1, O1S2, ..., O1Sm;

[0039] O2S1, O2S2, ..., O2Sm;

[0040] …

[0041] OnS1, OnS2, ..., OnSm.

[0042] In this context, the letters O and S represent OrderMethod (sorting parameter) and ScaleMethod (scale parameter), respectively.

[0043] It is important to note that in LU decomposition, one sorting method can correspond to multiple scaling methods. That is, when building the parameter list, a combination of a sorting parameter and any scaling parameter can be set, and the optimal combination can be selected through the method flow of this invention. The two parameters cannot exist independently in the parameter list, but by setting one of them to not perform scaling or sorting, the purpose of determining a specific sorting or scaling method can be achieved.

[0044] In this embodiment of the invention, the sorting methods include AMD, colAMD, METIS, scotch, etc., the specific operations of these sorting methods are prior art and are not within the scope of protection of this application; the scaling methods include row maximum element scaling, diagonal element scaling, row sum scaling, etc. In LU decomposition, n sorting methods and m scaling methods can be freely combined to create n×m selectable combinations of sorting parameters and scaling parameters. For example, if the sorting method is AMD sorting, the scaling method can be chosen to be no scaling, or any of the scaling methods such as diagonal element scaling, row maximum element scaling, etc., and this invention does not limit this.

[0045] In step 102, the parameter list is pre-filtered. Based on specific solution requirements (such as whether the user specifies a sorting method or a scaling method), suitable sorting and scaling parameters are pre-filtered from the parameter list.

[0046] In this embodiment of the invention, the parameter list can be pre-screened manually. For example, unnecessary sorting and scaling parameters can be removed, and the parameter list can be updated as follows:

[0047] O1S1, O1S2, ..., O1Sp;

[0048] O2S1, O2S2, ..., O2Sp;

[0049] …

[0050] OqS1, OqS2, ..., OnSp.

[0051] It should be noted that if this process is not performed, the parameter list will remain the original parameter list that was created.

[0052] In step 103, symbolic decomposition is performed on the sparse matrix, and its success is determined. Based on the preset non-zero padding threshold (NNZLimit), the parameter list (OiSj) is traversed, and symbolic decomposition is performed on the sparse matrix.

[0053] In this embodiment of the invention, Symbolic decomposition is performed on the sparse matrix starting from the parameters in the first row and first column (i=1, j=1) of the parameter list, and it is determined whether the symbolic decomposition can be successfully performed; the parameters corresponding to the unsuccessful symbolic decomposition are deleted, and then Symbolic decomposition is performed on the sparse matrix according to the next set of parameters; the parameter list (OiSj) is traversed to perform symbolic decomposition, and after completion, step 104 is entered.

[0054] In step 104, the number and computational cost of non-zero elements are marked. Based on the symbolic decomposition results, the number and computational cost of non-zero elements are counted. At the same time, sorting parameters and scaling parameters that meet the non-zero padding threshold conditions are selected from the parameter list, and the parameter list is updated.

[0055] In this embodiment of the invention, the parameters in the parameter list are traversed and symbolic decomposition is performed sequentially. During the process, parameters that do not meet the requirements are eliminated, and the number of non-zero elements and the computational cost of the parameters that meet the requirements are recorded, and the parameter list is updated.

[0056] In step 105, the sorting and scaling parameters with the least computational cost are identified. After steps 101 to 104, all sorting and scaling parameters that meet the threshold conditions are obtained. From the final parameter list, the sorting and scaling parameters with the least computational cost are selected.

[0057] In step 106, numerical decomposition is performed. Based on the sorting and scaling parameters with the lowest computational cost, the sparse matrix is ​​decomposed using LU decomposition to complete the numerical decomposition operation of the sparse matrix.

[0058] The optimization method for sorting and scaling parameters in the LU decomposition process described in this invention determines the sorting and scaling parameters that minimize the computational cost of numerical decomposition by screening them. This reduces the computational cost of LU in transient simulation at the cost of a smaller symbolic decomposition overhead, thereby improving LU decomposition efficiency and accelerating simulation speed.

[0059] In embodiments of the present invention, an electronic device is also provided. Figure 2 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, such as... Figure 2 As shown, the electronic device of the present invention includes a processor 201 and a memory 202, wherein,

[0060] The memory 202 stores a computer program, which, when read and executed by the processor 201, performs the steps in the sorting parameter and scaling parameter optimization method embodiment of the LU decomposition process as described above.

[0061] In embodiments of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the steps in the embodiments of the sorting parameter and scaling parameter optimization method in the LU decomposition process as described above when running.

[0062] In this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0063] It will be understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for optimizing ranking and scaling parameters in the LU decomposition process, applied to electronic design automation circuit simulation, wherein the optimal ranking and scaling parameters are determined before LU numerical decomposition, and the method is performed before solving the linear equation system in the circuit simulation, characterized in that... Includes the following steps: Create a parameter list for selecting sorting and scaling parameters; Based on the preset non-zero padding threshold, the parameter list is traversed to perform symbolic decomposition on the sparse matrix in the transient simulation process of the circuit. Based on the symbolic decomposition results, the number of non-zero elements and the computational cost are counted, sorting parameters and scaling parameters that meet the threshold are selected, and the parameter list is updated. Find the sorting and scaling parameters that minimize computational cost; Based on the sorting parameter and scaling parameter with the minimum computational cost, perform LU numerical decomposition on the sparse matrix; The step of performing symbolic decomposition on the sparse matrix by traversing the parameter list according to a preset non-zero padding threshold further includes: Starting with the sorting and scaling parameters in the first row and first column of the parameter list, symbolic decomposition is performed on the sparse matrix in sequence. It is determined whether the symbolic decomposition corresponding to each sorting parameter and scaling parameter is successfully executed. If it is successful, the steps of counting the number of non-zero elements and computational cost based on the symbolic decomposition results, filtering out sorting parameters and scaling parameters that meet the threshold conditions, and updating the parameter list are carried out. Otherwise, the corresponding sorting parameters and scaling parameters are deleted.

2. The method for optimizing sorting and scaling parameters in the LU decomposition process according to claim 1, characterized in that, The step of establishing a parameter list for selecting sorting parameters and scaling parameters further includes: establishing a parameter list for combinations of sorting parameters and any scaling parameters.

3. The method for optimizing sorting and scaling parameters in the LU decomposition process according to claim 2, characterized in that, The sorting parameters include: AMD sort, colAMD sort, METIS sort, and scotch sort.

4. The method for optimizing sorting and scaling parameters in the LU decomposition process according to claim 2, characterized in that, The scaling parameters include: no scaling, scaling by the largest element in the row, scaling by the diagonal element, and scaling by the sum of the rows.

5. The method for optimizing sorting and scaling parameters in the LU decomposition process according to claim 1, characterized in that, Also includes: Based on the solution requirements, suitable sorting and scaling parameters are pre-selected from the parameter list, and the parameter list is then updated.

6. The method for optimizing sorting and scaling parameters in the LU decomposition process according to claim 1, characterized in that, Also includes: The LU decomposition of sparse matrices can be performed using the AMD algorithm or METIS.

7. The method for optimizing sorting and scaling parameters in the LU decomposition process according to claim 1, characterized in that, The LU decomposition process includes: preprocessing and numerical decomposition. The preprocessing includes: performing row and column swaps on the sparse matrix.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor is configured to execute the computer program stored in the memory to implement the sorting parameter and scaling parameter optimization method in the LU decomposition process according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the sorting parameter and scaling parameter optimization method in the LU decomposition process according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Parallel LU decomposition for corner sparse matrix based on FPGA

    CN101533387A

  • Quick LU factorization method for circuit sparse matrix in circuit simulation

    CN102142052A