Sparse LU decomposition acceleration method for adaptive matrix multiplication based on density perception
The sparse LU decomposition acceleration method optimizes matrix multiplications in circuit simulation by using a density-aware adaptive approach with a random forest model, improving computational performance and reducing simulation time through adaptive operator selection.
Patent Information
- Application Number
- CN202411165058.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-27
AI Technical Summary
Existing sparse LU decomposition methods struggle to achieve optimal performance due to the irregular non-zero element distribution in circuit matrices, limiting the efficiency of dense matrix multiplication and prolonging the simulation time in complex large-scale circuit design.
A sparse LU decomposition acceleration method using density-aware adaptive matrix multiplication, which involves inputting submatrix blocks into a target random forest model to predict optimal matrix multiplications based on matrix characteristics, allowing for adaptive selection of the best performing operators for each operation.
This approach significantly reduces the operation time of sparse matrix LU decomposition, enhancing the computational performance and accelerating electronic circuit simulation by up to 9.35x in matrix multiplication time and 1.76x in numerical decomposition time compared to traditional methods.
Smart Images

Figure CN119203884A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication. Background Art
[0002] With the continuous expansion of semiconductor scale and the influence of parasitic effects, the size of the matrix that needs to be solved in the circuit simulation after layout is getting larger and larger, and solving the linear system is the most time-consuming. Compared with the iterative solution method, the direct solution method, namely LU decomposition, usually shows reliable accuracy and is not affected by the selection of appropriate preconditioners. Therefore, it is used in most cases to simulate linear solutions for actual circuits. Therefore, accelerating sparse LU decomposition is of great significance for transistor-level circuit simulation verification in complex large-scale circuit design.
[0003] Many traditional studies have proposed optimization algorithms for sparse LU decomposition, such as the multi-wavefront method or the supernode method, which have been applied to software packages such as MUMPS, UMFPACK, and SuperLU. Supernode LU decomposition is one of the most successful methods. It is to find or form submatrices with similar dense structures in the 3-level Basic Linear Algebra Subprograms (BLAS), so as to better call dense matrix multiplication to achieve performance improvement. However, the circuit matrix is an extremely special type of sparse matrix with irregular non-zero element distribution characteristics. It is often difficult to form supernodes when performing sparse LU decomposition on the circuit matrix with supernodes. Therefore, when solvers such as SuperLU that use supernodes solve the circuit matrix, the supernodes may not always be dense and often have a certain sparsity, which makes dense matrix multiplication unable to achieve the best performance. Summary of the invention
[0004] The present invention provides a sparse LU decomposition acceleration method of adaptive matrix multiplication based on density perception, which is used to solve the problem that the computational performance of matrix multiplication in sparse matrix LU decomposition in the prior art is difficult to achieve the optimal performance.
[0005] The present invention provides a sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication, comprising: Inputting multiple groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after the target sparse matrix is divided into blocks; Performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of submatrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; Performing electronic circuit simulation based on the L matrix and the U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
[0006] In some embodiments, before inputting the submatrix blocks of the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of submatrix blocks, the method further includes: Preprocessing the sparse matrix multiplication samples to obtain preprocessed sparse matrix multiplication samples; Performing LU decomposition on the preprocessed sparse matrix multiplication samples to obtain a plurality of target matrix multiplication samples, wherein the target matrix multiplication samples include a sample label and a plurality of matrix features; Based on the plurality of target matrix multiplication samples, training the target random forest model; The sample labels are used to indicate the comparison results of the computational performance of different matrix multiplications, and the matrix features are used to indicate the features that affect the computational performance of the matrix multiplication.
[0007] In some embodiments, preprocessing the sparse matrix multiplication samples to obtain preprocessed sparse matrix multiplication samples includes: The sparse matrix multiplication samples are subjected to standardization processing and sample equalization processing to obtain the preprocessed sparse matrix multiplication samples.
[0008] In some embodiments, the matrix multiplication comprises: Sparse matrix-matrix multiplication SpGEMM, general matrix multiplication GEMM, and dense-sparse matrix multiplication SpMM.
[0009] In some embodiments, the matrix characteristics include characteristics of matrix multiplication factors, and the characteristics of the matrix multiplication factors include at least one of the following: the number of matrix rows, the number of matrix columns, the number of non-zero elements in the matrix, the matrix density, the matrix bandwidth, the average number of non-zero elements in each row and column of the matrix, or the standard deviation of the non-zero elements in each row and column of the matrix.
[0010] In some embodiments, before inputting the submatrix blocks of the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of submatrix blocks, the method further includes: Acquiring circuit structure information of a target integrated circuit and parameter information of circuit elements corresponding to the target integrated circuit; The target sparse matrix is acquired based on the circuit structure information and the parameter information of the circuit elements.
[0011] The present invention also provides a sparse LU decomposition acceleration device based on dense density-aware adaptive matrix multiplication, comprising: A prediction module, used for inputting a plurality of groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the plurality of groups of submatrix blocks are obtained by grouping a plurality of submatrix blocks formed by dividing the target sparse matrix into blocks; A calculation module, used for performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of sub-matrix blocks, to obtain an L matrix and a U matrix corresponding to the target sparse matrix; A simulation module, used for performing electronic circuit simulation based on an L matrix and a U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-described sparse LU decomposition acceleration methods for adaptive matrix multiplication based on density perception.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described sparse LU decomposition acceleration methods for adaptive matrix multiplication based on density perception.
[0014] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned sparse LU decomposition acceleration methods based on dense density-aware adaptive matrix multiplication.
[0015] The sparse LU decomposition acceleration method of adaptive matrix multiplication based on density perception provided by the present invention can obtain the optimal matrix multiplication corresponding to each group of sub-matrix blocks by inputting multiple groups of sub-matrix blocks corresponding to the target sparse matrix into the target random forest model during the circuit simulation process, and realize adaptive selection of matrix multiplication, so that each matrix multiplication operation can select the operator with the best performance, improve the computational performance of the matrix multiplication operation, thereby reducing the operation time of the target sparse matrix LU decomposition, accelerating the target sparse matrix LU decomposition, greatly improving the LU decomposition performance, and thus accelerating the speed of electronic circuit simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention; Figure 2 It is a sample schematic diagram of a sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention; Figure 3 It is a confusion matrix diagram of the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention; Figure 4 It is a schematic diagram of the overall flow of the random forest algorithm of the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention; Figure 5 It is a characteristic calculation schematic diagram of the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention; Figure 6 It is a schematic diagram of the overall circuit simulation process of the sparse LU decomposition acceleration method of adaptive matrix multiplication based on density perception provided by the present invention; Figure 7 This is one of the performance comparison diagrams of the GEMM algorithm and the SpMM algorithm of the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention; Figure 8 This is the second schematic diagram of the performance comparison between the GEMM algorithm and the SpMM algorithm of the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention; Fig. 9 It is a structural schematic diagram of a sparse LU decomposition acceleration device based on dense density-aware adaptive matrix multiplication provided by the present invention; Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Combine the following Figure 1-Figure 10 The present invention describes a sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication.
[0020] The execution subject of the sparse LU decomposition acceleration method of adaptive matrix multiplication based on density perception provided by the present invention can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited by the present invention.
[0021] The technical solution of the present invention is described in detail below by taking a computer executing the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention as an example.
[0022] Figure 1 Schematic diagram of the process of the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention. Figure 1 As shown, the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the present invention includes: step 110, step 120 and step 130.
[0023] Step 110: input multiple groups of submatrix blocks corresponding to the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after dividing the target sparse matrix into blocks; Step 120, performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of sub-matrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; Step 130, performing electronic circuit simulation based on the L matrix and the U matrix corresponding to the target sparse matrix; Among them, the target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix features of the sub-matrix blocks.
[0024] Before building the actual circuit, simulating and verifying the design can greatly improve design efficiency. Especially for integrated circuits, the electronic processes such as photomasks required to physically realize the circuit are expensive, and the high complexity of integrated circuits is difficult to achieve on a breadboard, so it is difficult to study the behavior of the circuit using traditional methods. The most common circuit-level simulation program is the Simulation Program with Integrated Circuit Emphasis (SPICE), and the simulation or simulation of electronic circuits is ultimately transformed into solving a system of linear equations. Ax=b ,in A is an asymmetric, non-positive definite, large sparse matrix, b is a known vector, and is a vector to be solved. The direct method, namely LU decomposition method, is used in matrix calculation.
[0025] Solve a set of sparse linear systems Ax=b It occupies most of the SPICE simulation time because the underlying calculation of most analysis types (such as DC analysis, transient analysis, and small signal AC analysis, etc.) is to solve the linear equations established by improved node analysis.
[0026] The following example uses a large-scale power / ground network application. The transient simulation of the power / ground network is mainly used for power / signal integrity analysis of the chip. It is an important part of the physical design back-end sign-off and can generally be performed using general circuit simulation tools such as SPICE. However, the scale of the power / ground network has reached tens of millions or even hundreds of millions at advanced nodes. Traditional simulation tools are extremely time-consuming, often requiring several days or even weeks of simulation time, which seriously restricts design efficiency. In a general transient simulation process, it is necessary to calculate the voltage of each node at each time step. The simulation equation is: (1)
[0027] in, C , G and B In order to solve the differential system in the time domain, it can be simplified into a linear system by numerically discretizing the differential part of equation (1).
[0028] Consider the following initial value problem for an ordinary differential equation: (2)
[0029] Taking the commonly used differential method for solving ordinary differential equations (ODE), the Backward Euler method, as an example, the differential equation in equation (2) is solved in the interval [ t n+1 , t n ], we can get equations (3), (4) and (5): (3)
[0030] (4)
[0031] (5)
[0032] Furthermore, by combining equation (1), the trapezoidal Euler method can be used to transform equations (3), (4) and (5) to obtain equation (6): (6)
[0033] Among them, the left side of equation (6) x ( t + h ) is an unknown number, h is the iteration step length, the remaining parameters on the left side of the equation are all known parameters, and the parameters on the right side of the equation are all known parameters. Therefore, equation (6) can be further transformed into Ax=b form. Then the corresponding ones are: , .
[0034] thus, Ax=b That is, the obtained sparse matrix model. The target sparse matrix in the present invention can be the matrix in the sparse matrix model A .
[0035] It is understandable that in different circuit application scenarios, different simulation equations can be constructed, thereby obtaining different sparse matrix models.
[0036] Then, several processes in circuit simulation are transformed into solving linear equations. As the scale of circuits becomes larger and the types of circuits become more complex and diverse, it is of utmost importance to quickly solve linear equations. x In solving xIn the process, the target sparse matrix needs to be A Perform LU decomposition.
[0037] For the target sparse matrix A During the LU decomposition process, several matrix multiplications are performed. Each matrix multiplication is a group of sub-matrix blocks. Each group of sub-matrix blocks for performing matrix multiplication includes two calculation matrices and one result matrix.
[0038] In step 110, the target sparse matrix is first divided into blocks to obtain a plurality of sub-matrix blocks. Then, the plurality of sub-matrix blocks are grouped to obtain a plurality of groups of sub-matrix blocks. Then, the plurality of groups of sub-matrix super-blocks are input into the target random forest module model to obtain the optimal matrix multiplication corresponding to each group of sub-matrix blocks output by the model. The optimal matrix multiplication is the matrix multiplication with the optimal computing performance.
[0039] Each group of submatrix blocks includes two submatrices for matrix multiplication calculation. In the actual simulation process, the target sparse matrix will be divided into tens of thousands of submatrix blocks, and each group of submatrix blocks corresponds to one matrix multiplication. The total number of submatrix blocks and the number of calculations are very large.
[0040] It should be noted that LU decomposition is a type of matrix decomposition, which can decompose a matrix into the product of a lower triangular matrix and an upper triangular matrix (sometimes the product of them and a permutation matrix). Among them, L matrix and U matrix are lower triangular matrix and upper triangular matrix respectively.
[0041] In some embodiments, the target sparse matrix is a matrix that needs to be accelerated LU decomposition. The matrix in the field of circuit simulation is usually irregular and sparse, so the target sparse matrix can be a circuit matrix for describing circuit characteristics. Circuit characteristics can refer to circuit structure information and parameter information of circuit elements. Circuit structure information refers to the connection relationship between circuit elements, and the parameter information of circuit elements can be, for example, information such as voltage, electromotive force or current.
[0042] In addition to circuit matrices, there are often matrices in other fields that are also irregular and sparse, so the target sparse matrix may also be a non-circuit matrix. The present invention does not specifically limit the target sparse matrix.
[0043] It should be noted that in a matrix, if the number of elements with a value of 0 is much greater than the number of non-zero elements, and the distribution of non-zero elements is irregular, the matrix is called a sparse matrix; on the contrary, if the number of non-zero elements is the majority, the matrix is called a dense matrix. The density of a matrix is defined as the total number of non-zero elements divided by the total number of all elements in the matrix.
[0044] The target random forest model is a type of cluster classification model. Random forest is a forest built in a random way. The forest consists of many decision trees, and there is no correlation between each decision tree. After obtaining the random forest model, when a new sample enters, each decision tree in the random forest makes a judgment separately. The bagging (guided clustering algorithm) collection strategy is relatively simple. For classification problems, the voting method is usually used, and the category with the most votes or one of the categories is the final model output. For regression, the simple average method is usually used, and the regression results obtained by T weak learners are arithmetic averaged to obtain the final model output.
[0045] In some embodiments, before step 110, the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication further includes: Acquiring circuit structure information of a target integrated circuit and parameter information of circuit elements corresponding to the target integrated circuit; Based on the circuit structure information and the parameter information of the circuit elements, a target sparse matrix is obtained.
[0046] In actual implementation, the target integrated circuit is a circuit that needs to be simulated by an electronic circuit. Then, based on the circuit structure information of the target integrated circuit and the parameter information of the circuit elements corresponding to the target integrated circuit, the netlist input file of the target integrated circuit in the SPICE software can be obtained. Based on the netlist input file, the target sparse matrix can be obtained, and LU decomposition can be performed in subsequent embodiments.
[0047] In some embodiments, before step 110, the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication further includes: Preprocessing the sparse matrix multiplication samples to obtain preprocessed sparse matrix multiplication samples; Perform LU decomposition on the preprocessed sparse matrix multiplication samples to obtain a number of target matrix multiplication samples, where the target matrix multiplication samples include sample labels and multiple matrix features; Based on several target matrix multiplication samples, train the target random forest model; The sample labels are used to indicate the comparison results of the computational performance of different matrix multiplications, and the matrix features are used to indicate the features that affect the computational performance of the matrix multiplication.
[0048] In actual implementation, taking the circuit matrix as an example, during the model training process, a large-scale circuit matrix in the SuiteSparse collection (sparse matrix collection) can be randomly selected.
[0049] In order to eliminate the inconvenience caused by data magnitude to the analysis and to ensure the comparability between sparse matrix multiplication samples of different magnitudes in the data set, the sparse matrix multiplication samples are preprocessed to obtain preprocessed sparse matrix multiplication samples.
[0050] In some embodiments, preprocessing the sparse matrix multiplication samples to obtain preprocessed sparse matrix multiplication samples includes: The sparse matrix multiplication samples are standardized and equalized to obtain preprocessed sparse matrix multiplication samples.
[0051] In actual implementation, the sparse matrix multiplication sample may be a sample composed of a number of sub-matrix blocks obtained by dividing the sparse matrix sample into blocks.
[0052] Several sub-matrix block samples are processed by z-score standardization and sample equalization to obtain preprocessed sub-matrix block samples.
[0053] Among them, z-score standardization is a commonly used method for data processing. It can convert data of different magnitudes into z-score values of uniform measurement for comparison, which improves data comparability and weakens data interpretability.
[0054] Sample balancing refers to balancing the category weights so that samples with a smaller proportion have a higher weight, while samples with a larger proportion have a lower weight.
[0055] After obtaining the preprocessed sparse matrix multiplication samples (preprocessed submatrix block samples), the SuperLU_DIST software package can be used to perform LU decomposition on each matrix in the preprocessed sparse matrix multiplication samples in turn to obtain several target matrix multiplication samples. Each submatrix block sample contains multiple matrix features corresponding to the submatrix block and a sample label.
[0056] The sample labels are used to indicate the comparison results of the computational performance of different matrix multiplications.
[0057] In some embodiments, the matrix multiplication includes: Sparse matrix-matrix multiplication SpGEMM, general matrix multiplication GEMM, and dense-sparse matrix multiplication SpMM.
[0058] SpGEMM corresponds to General Sparse Matrix-matrix Multiplication (SpGEMM). The SpGEMM algorithm is a process of calculating the product of a sparse matrix A with m rows and k columns and a sparse matrix B with k rows and n columns to obtain a matrix C with m rows and n columns.
[0059] GEMM corresponds to General Matrix Multiplication (GEMM). The GEMM algorithm is a process of calculating the product of a matrix A with m rows and k columns and a matrix with k rows and n columns to obtain a matrix C with m rows and n columns.
[0060] SpMM can correspond to Sparse-dense Matrix-matrixMultiplication (SpMM). The SpMM algorithm is the process of calculating the product of a dense matrix A with m rows and k columns and a sparse matrix with k rows and n columns to obtain a matrix C with m rows and n columns.
[0061] Of course, matrix multiplication may also include other types of matrix multiplication, which are not specifically limited here.
[0062] As shown in Table 1, the "Oracle" in Table 1 represents the optimal total time calculated by selecting the best operator in SpMM and GEMM for each matrix multiplication under ideal conditions. It can be seen that compared with GEMM and SpMM, the performance improvement potential of "Oracle" is 1.03 to 10.24 times and 1.13 to 4.25 times respectively. Therefore, if a better operator can be selected for each matrix multiplication during the sparse LU decomposition process, the efficiency of sparse LU decomposition will be greatly accelerated.
[0063] Table 1 Analysis of the performance improvement space of matrix multiplication in sparse LU decomposition
[0064] Figure 7 and Figure 8 The performance comparison of GEMM algorithm and SpMM algorithm based on density and matrix size is shown respectively, taking matrices of size m*k and k*n as examples. σ represents the threshold, which is the performance dividing point between GEMM algorithm and SpMM algorithm.
[0065] Figure 7 The vertical axis Time represents time, and the horizontal axis Density represents the density of the matrix. The X-axis label "xxx_L" represents the input matrix A of the matrix multiplication, and "xxx_U" represents the input matrix B of the matrix multiplication.
[0066] For example: Figure 7 The label "circuit5M_dc_L" in Figure (a) and Figure 7 The label “G3_circuit_L” in Figure (b) represents the input matrix A of the matrix multiplication. Figure 7 The labels in Figure (c) are “Density circuit5M dc_U” and Figure 7The label “Density G3_circuit_U” in Figure (d) represents the input matrix B of the matrix multiplication.
[0067] Figure 8 The vertical axis Time represents time. For the convenience of display, the horizontal axis log10(m*k*n) represents the value after taking log10 of the product of the matrix dimensions. The X-axis labels represent different matrices.
[0068] For example: Figure 8 The label of Figure (a) is ASIC_320k. Figure 8 The label of Figure (b) in is pre2, Figure 8 The label of Figure (c) is circuit5M dc. Figure 8 The label of Figure (d) is transient. Different labels can represent different matrices.
[0069] It can be seen that the sizes of matrix blocks involved in matrix multiplication have different structural characteristics. If we rely on simple threshold judgment, it will be difficult to accurately select whether to execute the general GEMM algorithm or the SpMM algorithm suitable for sparse matrices, which limits the improvement of computing performance.
[0070] In summary, the present invention combines machine learning methods and utilizes a variety of matrix features to derive matrix multiplication performance data samples using the GEMM algorithm and the SpMM algorithm in sparse LU decomposition.
[0071] like Figure 2 As shown in Figure 1, each matrix multiplication sample has a sample label P. Taking the comparison results of the GEMM algorithm and the SpMM algorithm as an example, when P=1, it means that the performance of the matrix multiplication operation using the GEMM algorithm is better than that of the SpMM algorithm, and vice versa when P=0.
[0072] The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention improves the possibility of accelerating sparse matrix LU decomposition using different matrix multiplications by introducing multiple matrix multiplications for computational acceleration.
[0073] The matrix features in the present invention are used to indicate features that affect the computational performance of matrix multiplication. Figure 2 As shown, each matrix multiplication sample contains 15 matrix features, namely F1~F15.
[0074] like Figure 3As shown, the present invention also uses a confusion matrix to show performance metrics. Among them, TP (True Positive) samples are classified as positive samples and classified correctly; TN (True Negative) samples are classified as negative samples and classified correctly; FP (False Positive) samples are classified as positive samples, but classified incorrectly; FN (False Negative) samples are classified as negative samples, but classified incorrectly.
[0075] After obtaining a number of matrix multiplication samples, the target forest model is trained based on the number of matrix multiplication samples until an optimal target forest model is obtained.
[0076] The overall process of the random forest algorithm provided by the present invention is as follows Figure 4 shown.
[0077] In the model prediction stage, online prediction is adopted, so the prediction cost is negligible compared to the performance improvement.
[0078] The feature calculation process in the data set provided by the present invention is as follows Figure 5 shown.
[0079] The present invention can automatically select the current optimal matrix multiplication by training the target random forest model using a well-trained classifier; after the matrix features are defined and selected, these matrix multiplication samples will be tested using different matrix multiplication methods to obtain the entire data set including matrix features and labels, and then determine the optimal matrix multiplication algorithm. In summary, the focus of the algorithm roughly includes feature selection, sampling data set and classification technology.
[0080] In some embodiments, the trained target random forest model can predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on a number of matrix features of each group of sub-matrix blocks, where the optimal matrix multiplication is the matrix multiplication with the best computing performance; The sparse LU decomposition acceleration method of density-aware adaptive matrix multiplication provided by the present invention uses a machine learning method to achieve adaptive selection of different matrix multiplications, so that the operator with the best performance can be selected for each operation, thereby greatly improving the sparse matrix LU decomposition performance.
[0081] In step 120, the target sparse matrix is LU-decomposed based on the optimal matrix multiplication corresponding to each group of sub-matrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix.
[0082] In actual implementation, the present invention is based on the traditional sparse LU decomposition algorithm and focuses on the field of circuit simulation. The matrices in the field of circuit simulation are usually irregular and sparse, and the use of traditional dense matrix multiplication cannot achieve optimal performance. Therefore, in the matrix multiplication stage of sparse LU decomposition, the optimal matrix multiplication can be determined based on the matrix characteristics of the sub-matrix blocks, so as to achieve the most appropriate calculation each time, so as to optimize the local performance and finally achieve the optimal overall performance.
[0083] In addition to circuit matrices, matrices in other fields are often irregular and sparse. The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention is also effective for solving non-circuit matrices, and has good effectiveness and versatility.
[0084] In step 130, after performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication, an L matrix and a U matrix corresponding to the target sparse matrix are obtained. Then, based on the L matrix and the U matrix corresponding to the target sparse matrix, an electronic circuit simulation of the target integrated circuit is performed.
[0085] Since the electronic circuit simulation process will be converted into several linear equations to be solved, each solution of the linear equations can be accelerated, thereby speeding up the entire electronic circuit simulation process.
[0086] In some embodiments, the matrix characteristics include characteristics of matrix multiplication factors, and the characteristics of the matrix multiplication factors include at least one of the following: the number of matrix rows, the number of matrix columns, the number of non-zero elements in the matrix, the matrix density, the matrix bandwidth, the average number of non-zero elements in each row and column of the matrix, or the standard deviation of the non-zero elements in each row and column of the matrix.
[0087] In the related technology, matrix multiplication is one of the computing cores that takes up a relatively large proportion of time in sparse matrix LU decomposition algorithms such as super node LU decomposition. First, it is verified that the time of the GEMM algorithm accounts for the vast majority of the sparse matrix LU decomposition, and further verified that the matrix blocks for GEMM operations have strong sparsity. It has been verified that most circuit matrices meet this characteristic.
[0088] The present invention selects the SpMM algorithm which can replace the GEMM operation, and analyzes the total calculation time of the matrix multiplication operation and the calculation time of each matrix block in the sparse matrix LU decomposition.
[0089] It is not possible to select the optimal matrix multiplication by relying on a single threshold alone, and it is difficult to achieve the optimal matrix multiplication selection with a single parameter or a single threshold. The definition and selection of matrix features determine the performance of the training model. The present invention combines multiple features and explores that there is more than one matrix feature that affects the computing performance, but includes at least one of the following features of the matrix multiplication factor: the number of matrix rows, the number of matrix columns, the number of non-zero elements in the matrix, the matrix density, the matrix bandwidth, the average number of non-zero elements in each row and column of the matrix, or the standard deviation of non-zero elements in each row and column of the matrix. And other factors.
[0090] It should be noted that the number of matrix rows is the number of rows of the matrix, the number of matrix columns is the number of columns of the matrix, the number of non-zero elements in the matrix is used to indicate the number of non-zero elements in the matrix, and the matrix density is the ratio of the number of non-zero elements to the total number of elements in the matrix.
[0091] The bandwidth matrix refers to the sparse matrix in which the non-zero elements are only on the main diagonal and the diagonals near the main diagonal. The matrix bandwidth includes the upper bandwidth and the lower bandwidth. The upper bandwidth refers to the distance between the farthest diagonal containing non-zero elements in the upper diagonal and the main diagonal, and the lower bandwidth refers to the distance between the farthest diagonal containing non-zero elements in the lower diagonal and the main diagonal.
[0092] The average number of non-zero elements in each row and column of the matrix may be the average number of non-zero elements in each row of the matrix or the average number of non-zero elements in each column of the matrix.
[0093] The standard deviation of the non-zero elements in each row and column of the matrix can be the standard deviation of the non-zero elements in each row of the matrix or the standard deviation of the non-zero elements in each column of the matrix.
[0094] The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention can ensure the performance of the training model by selecting reasonable matrix features, which not only reduces the computational complexity of the target random forest model inference, but also improves the accuracy of classification.
[0095] In some embodiments, as shown in Table 2, among the six circuit matrices tested, the sparse LU decomposition acceleration method (i.e., AI algorithm) based on density-aware adaptive matrix multiplication provided by the present invention has a maximum speedup of 9.35x and an average speedup of 5.35x in matrix multiplication time compared with the GEMM algorithm, and a maximum speedup of 1.35x and an average speedup of 1.05x in matrix multiplication time compared with the SpMM algorithm. Compared with the numerical decomposition stage, the maximum speedup of the numerical decomposition time is 1.76 times, and the average speedup is 1.50 times. Compared with the most advanced solver SuperLU_DIST, the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention shows significant performance improvements.
[0096] As shown in Table 3, in the tested non-circuit matrix, the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication (i.e., AI algorithm) provided by the present invention has a maximum speedup of 4.32x and an average speedup of 2.62x in matrix multiplication time compared with the GEMM algorithm, and a maximum speedup of 1.32x and an average speedup of 1.28x in matrix multiplication time compared with the SpMM algorithm. Compared with the numerical decomposition stage, the maximum speedup of the numerical decomposition time is 2.08 times and the average speedup is 1.55 times. Compared with the most advanced solver SuperLU_DIST, the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication provided by the present invention shows significant performance improvements.
[0097] In Table 2 and Table 3, circuit matrix is the circuit matrix, non-circuit matrix is the non-circuit matrix, Matrix multiplication time (s) is the matrix multiplication time (seconds), Numeric factorization time (s) is the numerical factorization time (seconds), Proposed is the LU decomposition algorithm used in the present invention, and nnz (non zeros, nnz) is the total number of non-zero elements of the matrix.
[0098] Table 2 Circuit matrix performance table
[0099] Table 3 Non-circuit matrix performance table
[0100] The sparse LU decomposition acceleration method of adaptive matrix multiplication based on density perception provided by the present invention can obtain the optimal matrix multiplication corresponding to each group of sub-matrix blocks by inputting multiple groups of sub-matrix blocks corresponding to the target sparse matrix into the target random forest model during the circuit simulation process, and realize adaptive selection of matrix multiplication, so that each matrix multiplication operation can select the operator with the best performance, improve the computational performance of the matrix multiplication operation, thereby reducing the operation time of the target sparse matrix LU decomposition, accelerating the target sparse matrix LU decomposition, greatly improving the LU decomposition performance, and thus accelerating the speed of electronic circuit simulation.
[0101] like Figure 6 As shown, Figure 6 The overall circuit simulation process diagram of the sparse LU decomposition acceleration method of the adaptive matrix multiplication based on density perception provided by the present invention may include the following steps: 1. Read the matrix and input waveform of Modified Nodal Analysis (MNA) u(t) ; 2. Solve the ODE using the Backward Euler method, the Trapezoidal Euler method, or the Gear method to obtain an expression for the matrix A.
[0102] 3. Use artificial intelligence (AI) self-tuning optimization method to solve Ax=b ; Among them, the AI self-tuning optimization method can be implemented based on the target random forest model; Specifically, it includes: in the process of performing LU decomposition on the matrix A, obtaining the pair of sub-matrix blocks corresponding to the matrix A, and then selecting the optimal matrix multiplication for each group of sub-matrix blocks; Successive solution t n Node voltage x ( t i ): generate t=t i When the vector on the right side of the equation b ; Then solve it by distributed triangular solution Ly=b , Ux=y , get the node voltage x ( t i ); 4. Output transient simulation results.
[0103] The sparse LU decomposition acceleration device based on density-aware adaptive matrix multiplication provided by the present invention is described below. The sparse LU decomposition acceleration device based on density-aware adaptive matrix multiplication described below and the sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication described above can be referenced to each other.
[0104] Fig. 9 It is a structural schematic diagram of a sparse LU decomposition acceleration device based on dense density-aware adaptive matrix multiplication provided by the present invention.
[0105] like Fig. 9 As shown, the sparse LU decomposition acceleration device based on density-aware adaptive matrix multiplication provided by the present invention includes: a prediction module 910, an operation module 920 and a simulation module 930.
[0106] A prediction module 910 is used to input multiple groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after the target sparse matrix is divided into blocks; An operation module 920 is used to perform LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of sub-matrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; A simulation module 930, configured to perform electronic circuit simulation based on an L matrix and a U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
[0107] The sparse LU decomposition acceleration device of adaptive matrix multiplication based on density perception provided by the present invention can obtain the optimal matrix multiplication corresponding to each group of sub-matrix blocks by inputting multiple groups of sub-matrix blocks corresponding to the target sparse matrix into the target random forest model during the circuit simulation process, and realize the adaptive selection of matrix multiplication, so that each matrix multiplication operation can select the operator with the best performance, improve the computational performance of the matrix multiplication operation, thereby reducing the operation time of the target sparse matrix LU decomposition, accelerating the target sparse matrix LU decomposition, greatly improving the LU decomposition performance, and thus accelerating the speed of electronic circuit simulation.
[0108] In some embodiments, the apparatus further comprises: A preprocessing module, used for preprocessing the sparse matrix multiplication samples to obtain the preprocessed sparse matrix multiplication samples before inputting the multiple groups of sub-matrix blocks corresponding to the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of sub-matrix blocks; Performing LU decomposition on the preprocessed sparse matrix multiplication samples to obtain a plurality of target matrix multiplication samples, wherein the target matrix multiplication samples include a sample label and a plurality of matrix features; Based on the plurality of target matrix multiplication samples, training the target random forest model; The sample labels are used to indicate the comparison results of the computational performance of different matrix multiplications, and the matrix features are used to indicate the features that affect the computational performance of the matrix multiplication.
[0109] In some embodiments, the preprocessing module is specifically used to: The sparse matrix multiplication samples are subjected to standardization processing and sample equalization processing to obtain the preprocessed sparse matrix multiplication samples.
[0110] In some embodiments, the matrix multiplication comprises: Sparse matrix-matrix multiplication SpGEMM, general matrix multiplication GEMM, and dense-sparse matrix multiplication SpMM.
[0111] In some embodiments, the matrix characteristics include characteristics of matrix multiplication factors, and the characteristics of the matrix multiplication factors include at least one of the following: the number of matrix rows, the number of matrix columns, the number of non-zero elements in the matrix, the matrix density, the matrix bandwidth, the average number of non-zero elements in each row and column of the matrix, or the standard deviation of the non-zero elements in each row and column of the matrix.
[0112] In some embodiments, the apparatus further comprises: An acquisition module, used for obtaining circuit structure information of a target integrated circuit and parameter information of circuit elements corresponding to the target integrated circuit before inputting the multiple groups of sub-matrix blocks corresponding to the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of sub-matrix blocks; The target sparse matrix is acquired based on the circuit structure information and the parameter information of the circuit elements.
[0113] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute a sparse LU decomposition acceleration method based on dense-aware adaptive matrix multiplication, the method comprising: Inputting multiple groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after the target sparse matrix is divided into blocks; Performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of submatrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; Performing electronic circuit simulation based on the L matrix and the U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
[0114] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0115] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the above methods, the method comprising: Inputting multiple groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after the target sparse matrix is divided into blocks; Performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of submatrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; Performing electronic circuit simulation based on the L matrix and the U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
[0116] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication provided by the above methods, the method comprising: Inputting multiple groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after the target sparse matrix is divided into blocks; Performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of submatrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; Performing electronic circuit simulation based on the L matrix and the U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
[0117] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication, characterized in that: include: Inputting multiple groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the multiple groups of submatrix blocks are obtained by grouping a number of submatrix blocks formed after the target sparse matrix is divided into blocks; Performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of submatrix blocks to obtain an L matrix and a U matrix corresponding to the target sparse matrix; Performing electronic circuit simulation based on the L matrix and the U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
2. The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication according to claim 1, characterized in that: Before inputting the multiple groups of submatrix blocks corresponding to the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of submatrix blocks, the method further includes: Preprocessing the sparse matrix multiplication samples to obtain preprocessed sparse matrix multiplication samples; Performing LU decomposition on the preprocessed sparse matrix multiplication samples to obtain a plurality of target matrix multiplication samples, wherein the target matrix multiplication samples include a sample label and a plurality of matrix features; Based on the plurality of target matrix multiplication samples, training the target random forest model; The sample labels are used to indicate the comparison results of the computational performance of different matrix multiplications, and the matrix features are used to indicate the features that affect the computational performance of the matrix multiplication.
3. The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication according to claim 2, characterized in that: The preprocessing of the sparse matrix multiplication samples to obtain the preprocessed sparse matrix multiplication samples includes: The sparse matrix multiplication samples are subjected to standardization processing and sample equalization processing to obtain the preprocessed sparse matrix multiplication samples.
4. The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication according to claim 2, characterized in that: The matrix multiplication includes: Sparse matrix-matrix multiplication SpGEMM, general matrix multiplication GEMM, and dense-sparse matrix multiplication SpMM.
5. The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication according to any one of claims 1 to 4, characterized in that: The matrix characteristics include characteristics of matrix multiplication factors, and the characteristics of the matrix multiplication factors include at least one of the following: the number of matrix rows, the number of matrix columns, the number of non-zero elements in the matrix, the matrix density, the matrix bandwidth, the average number of non-zero elements in each row and column of the matrix, or the standard deviation of the non-zero elements in each row and column of the matrix.
6. The sparse LU decomposition acceleration method based on density-aware adaptive matrix multiplication according to any one of claims 1 to 4, characterized in that: Before inputting the multiple groups of submatrix blocks corresponding to the target sparse matrix into the target random forest model to obtain the optimal matrix multiplication corresponding to each group of submatrix blocks, the method further includes: Acquiring circuit structure information of a target integrated circuit and parameter information of circuit elements corresponding to the target integrated circuit; The target sparse matrix is acquired based on the circuit structure information and the parameter information of the circuit elements.
7. A sparse LU decomposition acceleration device based on density-aware adaptive matrix multiplication, characterized in that: include: A prediction module, used for inputting a plurality of groups of submatrix blocks corresponding to a target sparse matrix into a target random forest model to obtain an optimal matrix multiplication corresponding to each group of submatrix blocks, wherein the target sparse matrix is used to indicate a matrix describing circuit characteristics in electronic circuit simulation, and the plurality of groups of submatrix blocks are obtained by grouping a plurality of submatrix blocks formed by dividing the target sparse matrix into blocks; A calculation module, used for performing LU decomposition on the target sparse matrix based on the optimal matrix multiplication corresponding to each group of sub-matrix blocks, to obtain an L matrix and a U matrix corresponding to the target sparse matrix; A simulation module, used for performing electronic circuit simulation based on an L matrix and a U matrix corresponding to the target sparse matrix; The target random forest model is used to predict the optimal matrix multiplication corresponding to each group of sub-matrix blocks based on the matrix characteristics of the sub-matrix blocks.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication is implemented as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication is implemented as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the sparse LU decomposition acceleration method based on dense density-aware adaptive matrix multiplication is implemented as described in any one of claims 1 to 6.