Reconfigurable matrix inversion system and method supporting multiple matrix decomposition modes
By adaptively selecting the matrix decomposition process and reusing hardware modules, the computational resource and storage pressure issues of high-order matrix inversion are solved, realizing a high-performance and universal matrix inversion system suitable for various matrix types.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies cannot effectively support high-order matrix inversion calculations, resulting in excessive computational and storage pressure. Furthermore, hardware-accelerated matrix inversion algorithms are limited to low-order or specific-order matrices, failing to balance computational performance and versatility.
Design a reconfigurable matrix inversion system that supports multiple matrix decomposition methods. The system adaptively selects between Cholesky decomposition and LU decomposition processes through a top-level control module, and reuses the triangular matrix inversion module and the matrix multiplication module to achieve efficient utilization of hardware resources and improved computational performance.
It expands the application scope of hardware-accelerated inversion, reduces hardware resource overhead, improves computing performance and system stability, supports high performance, versatility and scalability, and is suitable for inversion calculations of various non-singular square matrices, including conjugate positive definite matrices.
Smart Images

Figure CN121996892A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip technology, and in particular to a reconfigurable matrix inversion system and method that supports multiple matrix decomposition methods. Background Technology
[0002] Matrix inversion is a core operation in computationally intensive systems, and its performance determines the overall system performance. Matrix inversion is both computationally intensive and memory-intensive; as the order increases, the time, space, and resource costs multiply, constraining high-order matrix computation. Storing the original matrix and intermediate results requires additional memory space, which can lead to storage pressure under limited memory conditions. Using application-specific integrated circuits (ASICs) to accelerate matrix inversion can provide higher performance.
[0003] Hardware-accelerated matrix inversion is mainly based on Cholesky decomposition, LU decomposition, and QR decomposition. Among them, Cholesky decomposition and LU decomposition are more suitable for parallel execution on hardware such as GPUs. Therefore, QR decomposition has not been used in hardware-accelerated scenarios.
[0004] The two decomposition algorithms mentioned above rely directly on formula calculations, requiring a large amount of multiplication and accumulation computational resources, resulting in high computational and addressing complexity. The subsequent triangular matrix inversion also suffers from high computational resource requirements and complexity, resulting in the ability to process only low-order or specific-order matrices. Directly integrating hardware modules that support the two algorithms will significantly increase the area and computational resource overhead, increase the layout and wiring density, and thus affect the chip's operating frequency. Summary of the Invention
[0005] This application provides a reconfigurable matrix inversion system and method that supports multiple matrix decomposition methods, in order to solve the problem of not being able to integrate Cholesky decomposition and LU decomposition.
[0006] In a first aspect, this application provides a reconfigurable matrix inversion system that supports multiple matrix decomposition methods, including: a top-level control module, a matrix decomposition module, a triangular matrix inversion module, a matrix processing module, and a matrix multiplication module; The top-level control module is used to determine the target decomposition process based on the attributes of the input matrix. The target decomposition process is either the Cholesky decomposition process or the LU decomposition process. When the target decomposition process is a Cholesky decomposition process, the matrix decomposition module performs Cholesky decomposition on the input matrix to output a first upper triangular matrix; the triangular matrix inversion module inverts the first upper triangular matrix to output a first upper triangular inverse matrix; the matrix processing module transposes and rearranges the first upper triangular inverse matrix to output a first lower triangular matrix; the matrix multiplication module multiplies the first upper triangular inverse matrix with the first lower triangular matrix to output the target inverse matrix; the first lower triangular matrix is a matrix conforming to the data storage format. When the target decomposition process is an LU decomposition process, the matrix decomposition module performs LU decomposition on the input matrix to output a second upper triangular matrix and a second lower triangular matrix. The matrix processing module performs transformation processing on the second lower triangular matrix to output a third upper triangular matrix. The triangular matrix inversion module inverts the second upper triangular matrix to output a first inverse matrix and inverts the third upper triangular matrix to output a second inverse matrix. The matrix processing module performs column transformation on the second inverse matrix to obtain a transformed inverse matrix. The matrix multiplication module multiplies the transformed inverse matrix with the first inverse matrix to output the target inverse matrix.
[0007] Secondly, this application provides a reconstructable matrix inversion method that supports multiple matrix decomposition methods, including: Based on the properties of the input matrix, the target decomposition process is determined, which is either the Cholesky decomposition process or the LU decomposition process. When the target decomposition process is a Cholesky decomposition process, the input matrix is decomposed using Cholesky decomposition to output a first upper triangular matrix; the first upper triangular matrix is inverted to output a first upper triangular inverse matrix; the first upper triangular inverse matrix is transposed and rearranged to output a first lower triangular matrix; the first upper triangular inverse matrix is multiplied by the first lower triangular matrix to output the target inverse matrix; the first lower triangular matrix is a matrix that conforms to the data storage format. When the target decomposition process is an LU decomposition process, LU decomposition is performed on the input matrix to output a second upper triangular matrix and a second lower triangular matrix. The second lower triangular matrix is transformed to output a third upper triangular matrix. The second upper triangular matrix is inverted to output a first inverse matrix, and the third upper triangular matrix is inverted to output a second inverse matrix. The second inverse matrix is column-transformed to obtain a transformed inverse matrix. The transformed inverse matrix is multiplied by the first inverse matrix to output the target inverse matrix.
[0008] As can be seen from the above technical solutions, this application provides a reconfigurable matrix inversion system and method that supports multiple matrix decomposition methods. The system adaptively selects the decomposition process based on matrix attributes through a top-level control module, enabling the system to handle various non-singular square matrices, including conjugate positive definite matrices, thus expanding the application scope of hardware-accelerated inversion. After determining the process, by reusing the triangular matrix inversion module and matrix multiplication module, which are necessary in both the Cholesky and LU processes, the logic and area resource overhead caused by simply integrating two independent hardware sets to support the two algorithms is avoided. The module reuse strategy reduces the duplication of circuits with the same functions on the chip, reduces the complexity and density of the overall layout and routing, and is conducive to improving the chip's operating frequency and stability. At the same time, the data processing module is responsible for transpose, transformation, and rearrangement operations, freeing the computation module from complex data formatting tasks, allowing it to focus on core arithmetic operations, improving the utilization efficiency of computing resources and the overall performance of the system. Therefore, the system achieves an effective balance between computing performance and hardware cost through the reuse of hardware modules and the reasonable division of tasks. In terms of functionality, it supports reconstruction into two matrix inversion accelerators: Cholesky inversion and LU inversion, ensuring high performance, versatility and scalability of matrix inversion. Attached Figure Description
[0009] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram of the structure of a reconfigurable matrix inversion system that supports multiple matrix decomposition methods, provided in an embodiment of this application. Figure 2 A flowchart illustrating the computational process of performing Cholesky decomposition is provided for embodiments of this application. Figure 3 A schematic diagram of Cholesky decomposition using multi-parallel iteration provided for embodiments of this application; Figure 4 A schematic diagram of LU decomposition using multi-parallelism iteration provided for an embodiment of this application; Figure 5 This is a flowchart illustrating the computational process of performing LU decomposition, as provided in an embodiment of this application. Figure 6 A flowchart illustrating the calculation process of inverting a triangular matrix is provided for embodiments of this application. Figure 7 A schematic diagram of triangular matrix inversion using multi-parallel iteration provided in this application embodiment; Figure 8This is a schematic diagram illustrating the sequential storage of matrix elements in SRAM according to an embodiment of this application. Figure 9 This is a schematic diagram illustrating the storage of matrix elements in SRAM in an array format, as provided in an embodiment of this application. Figure 10 This is a schematic diagram of the storage mapping for performing LU inversion on a matrix provided in an embodiment of this application. Detailed Implementation
[0011] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following examples do not represent all embodiments consistent with this application.
[0012] With the development of information technology, the requirements for data processing capabilities are becoming increasingly stringent. In hot fields such as big data processing and artificial intelligence, the proportion of intensive computing tasks is rising. Matrix operations, as a core component of intensive computing, fundamentally determine the overall performance of the system. Matrix inversion, as a type of matrix operation, is increasingly in demand for supporting high-performance and high-order matrix calculations.
[0013] Matrix inversion is characterized by its computational and memory-intensive nature. As the matrix order increases, the time, space, and computational resource costs required to support inversion operations multiply, posing a significant constraint on inverting high-order matrices. As a computationally intensive operation, inverting high-order matrices consumes a considerable amount of time for computation. Furthermore, since additional space is needed to store not only the original matrix but also the intermediate results and the final inverse matrix, this can become a problem when memory is limited.
[0014] For the reasons mentioned above, implementing matrix inversion in software performs poorly in real-time operations. Some solutions accelerate matrix inversion using FPGAs (Field Programmable Gate Arrays), but since FPGAs mainly perform calculations through lookup tables, the granularity is fine, and a large amount of resources are used for configurable on-chip routing and wiring, resulting in low utilization of computing resources.
[0015] Due to the inherent advantages of hardware in parallel computing, using ASICs (Application-Specific Integrated Circuits) to accelerate matrix inversion can provide higher performance. Currently, hardware-accelerated matrix inversion calculations are mainly divided into Cholesky decomposition, LU decomposition, and QR decomposition. Since Cholesky decomposition and LU decomposition are more suitable for the computational process of hardware parallel computing such as GPUs, we do not consider using QR decomposition to achieve hardware-accelerated matrix inversion.
[0016] In LU decomposition, the presence of very small pivot elements can amplify rounding errors, leading to inaccurate results. To address this, pivot selection techniques must be employed, involving row swapping (PA=LU) before decomposition. This increases the algorithm's complexity and computational cost. However, the Cholesky algorithm, dealing with symmetric positive definite matrices, ensures that all diagonal elements (called Schur's complement) are positive during decomposition, avoiding the problem of small pivot elements. This makes Cholesky decomposition inherently numerically stable.
[0017] Furthermore, LU decomposition requires inverting two triangular matrices, while Cholesky only requires inverting one triangular matrix. Therefore, the number of floating-point operations in LU decomposition is approximately [missing information]. The number of floating-point operations in Cholesky decomposition is approximately For large-scale matrices, Cholesky decomposition is approximately twice as fast as LU decomposition, and saves half the storage space. However, LU decomposition is applicable to almost all invertible square matrices, as long as the principal minors of the matrix are not zero (even if they are zero, it can still be performed by selecting pivots), making it universal; while Cholesky decomposition is only applicable to symmetric positive definite matrices. If the matrix is not a symmetric positive definite matrix, only LU decomposition can be used for inversion.
[0018] In summary, Cholesky decomposition and LU decomposition each have their advantages and disadvantages in terms of computational speed and versatility. Therefore, if it is necessary to ensure the versatility and high performance of matrix inversion, it is necessary to design a matrix inversion hardware system that can support the two algorithms mentioned above.
[0019] In the traditional Cholesky decomposition, the elements of matrix L can be obtained through the following recursive formula: ; In traditional LU decomposition, the elements of the L and U matrices obtained from the decomposition can be obtained through the following recursive formula: ; The two algorithms described above directly utilize formulas for calculation, requiring computational resources for multiplication and accumulation, and exhibiting high computational and addressing complexity. Furthermore, the subsequent triangular matrix inversion also suffers from high computational resource requirements and complexity. Therefore, this algorithm is limited to calculating matrix inversions of low-order or specific-order matrices. Moreover, simply integrating hardware modules that directly support both algorithms would not only result in significant overhead in terms of area and computational resources, but also a substantial increase in layout and routing density, severely impacting the chip's operating frequency.
[0020] This application provides a reconfigurable matrix inversion system that supports multiple matrix decomposition methods. This hardware system can support inversion operations of matrices of any order from 4 to 176. In computational scenarios with diverse matrix types and sizes, it supports two matrix inversion methods: Cholesky inversion and LU inversion. It can support inversion computation tasks of all non-singular matrices while ensuring performance priority.
[0021] The system comprises a top-level control module, a matrix decomposition module, a triangular matrix inversion module, a matrix processing module, and a matrix multiplication module. By setting up top-level control logic and encapsulating sub-modules, the triangular matrix inversion module, matrix multiplication module, and matrix processing module are reused, greatly reducing area resource overhead. Furthermore, since this system supports computations with up to 16 degrees of parallelism, it also achieves excellent performance. In summary, the system is designed to address the challenges of low performance and high resource overhead in matrix inversion computation, and to a certain extent, it overcomes the bottlenecks in both performance and area resources.
[0022] The following provides a detailed description of the system modules. The top-level control module can be implemented using a finite state machine or a controller controlled by microcode. In some embodiments, the top-level control module includes a configuration register and a logic decision circuit. The configuration register receives externally input control commands or matrix attribute parameters, and the logic decision circuit makes decisions about the calculation process based on this information.
[0023] The top-level control module determines the target decomposition process based on the properties of the input matrix, including its order, symmetry, and positive definiteness. These properties define either the Cholesky decomposition or the LU decomposition process. The top-level control module analyzes these properties to generate corresponding control signals, thereby determining whether subsequent calculations should follow the Cholesky or LU decomposition path. For example, if the input matrix is identified as a conjugate positive definite matrix, the top-level control module will choose the more computationally efficient Cholesky decomposition process; for general invertible square matrices that do not meet this condition, the more widely applicable LU decomposition process will be selected.
[0024] like Figure 1 As shown, CHO_INV_FSM is a Cholesky inverse finite state machine, LU_INV_FSM is an LU inverse finite state machine, and TRI_INV_FSM is a triangular matrix inverse finite state machine. They activate the corresponding computation path based on the properties of the input matrix.
[0025] When the target decomposition process is the Cholesky decomposition process, the matrix decomposition module performs Cholesky decomposition on the input matrix to output the first upper triangular matrix. The matrix decomposition module is an arithmetic unit that performs matrix decomposition calculations.
[0026] In one implementation, the matrix factorization module consists of an array of multiple parallel processing units, which are dedicated to performing basic operations such as floating-point multiplication, addition, square root, and reciprocal.
[0027] The matrix decomposition module receives instructions from the top-level control module and input matrix data. It performs iterative calculations according to the specified algorithm, namely Cholesky decomposition or LU decomposition. Its output is the triangular matrix obtained after decomposition. In Cholesky decomposition, an upper triangular matrix is output.
[0028] like Figure 1 As shown, DIV corresponds to the divider, MUL to the multiplier, MUL_ADD to the multiply-adder, SEND to the sender, REC to the receiver, LU_MV_L to the LU matrix shifter, PE_MUX to the processing unit selector, SRAM_MUX to the storage selector, DATA_GEN to the data generator, LU_COL_MV is a component of the matrix decomposition module, serving the LU decomposition process, PRE_PADDING to the pre-padding, REORDER to the reordering, TRANSPOSE to the transpose, and LU_TRANSPOSE to the LU transpose.
[0029] The triangular matrix inversion module inverts the first upper triangular matrix to output the first upper triangular inverse matrix. The triangular matrix inversion module is a hardware unit used to perform inversion operations on the upper triangular matrix.
[0030] The implementation of the triangular matrix inversion module can also be based on a processing unit array, and its internal logic is designed to efficiently execute backward or forward iteration algorithms. The module's design is reusable, meaning its hardware circuitry and microcode are generic; it can be called to process upper triangular matrices generated in the Cholesky process, as well as upper triangular matrices generated in the LU process and upper triangular matrices transformed from lower triangular matrices. The module's input is a triangular matrix and its order, and its output is the inverse of that triangular matrix.
[0031] like Figure 2 As shown, taking an N-order matrix as the source matrix, the decomposed upper triangular matrix is obtained through four operations: taking the square root of the diagonal elements and finding the reciprocal, updating the current row elements, updating the lower right rectangular area, and setting the elements in the lower triangular area to zero. After N iterations, the upper triangular matrix is obtained.
[0032] like Figure 3As shown, ① is the first step of an iteration, taking the square root of the diagonal element and finding its reciprocal; ② is the update operation of complex multiplication between the diagonal element of the row and the subsequent elements, with the other multiplier being the calculation result stored in the register in ①, and zeros being padded to the elements before the diagonal element; ③ is the operation of updating the lower right rectangular area, and the specific update calculation formula is described below; ④ shows the matrix after N iterations, with each iteration adding a row and a column to the processed area, and different iteration numbers being marked with different suits, until all matrix elements have been processed, finally resulting in an upper triangular matrix (five suits) where the lower triangular area (light-colored part) is all zero.
[0033] In some embodiments, when performing Cholesky decomposition, the matrix decomposition module obtains the first upper triangular matrix through iterative calculation, including: calculating the diagonal elements of the first upper triangular matrix, where the value of each diagonal element is the square root of the corresponding diagonal element of the input matrix, as shown in the following formula: ; in, These are the diagonal elements of the first upper triangular matrix. The diagonal elements of the input matrix are given, and k is the current iteration number. Refer to the following formula, and then calculate the multiplier for the current iteration step based on the diagonal elements. The multiplier is the reciprocal of the square root of the diagonal element. ; in, It is the multiplier for multiplying the elements after the diagonal element of the k-th row; See the following formula, which updates the subsequent elements of the row containing the diagonal elements in the first upper triangular matrix according to the multiplier. The value of the subsequent element is the product of the corresponding element in the input matrix and the multiplier. ; in, These are the elements following the diagonal element of the k-th row of the first upper triangular matrix; Refer to the following formula to update the elements in the lower right rectangular area of the input matrix. The updated value of the elements in the lower right rectangular area is the original value minus the product of the conjugate of the corresponding element in the current row of the first upper triangular matrix and the subsequent elements. ; in, This is the result of iterating over the elements in the lower right rectangle. The values for the lower right rectangular area before iteration. Let be the complex conjugate of the element in the k-th row of the first upper triangular matrix.
[0034] The reason for using this iterative computation is that the mathematical definition of Cholesky decomposition is itself recursive, and converting it into an iterative form makes it easier to implement in hardware in a pipelined or parallel manner.
[0035] Subsequently, the matrix processing module begins working to prepare another multiplier matrix required for matrix multiplication. The matrix processing module transposes and rearranges the first upper triangular inverse matrix to output the first lower triangular matrix. The matrix processing module performs a series of data recombination and format transformation operations. These operations do not involve complex arithmetic calculations, but are crucial for preparing the correct data format required for matrix multiplication.
[0036] Furthermore, the matrix processing module will simultaneously rearrange the first upper triangular inverse matrix and change its storage format.
[0037] The matrix processing module may include a format conversion unit and a conjugate calculation unit. The format conversion unit transforms columnar storage into sequential storage. The function of the matrix processing module varies depending on the process. In the Cholesky decomposition process, it mainly performs the conjugate transpose operation, converting the inverse of an upper triangular matrix into its conjugate transpose, which results in a lower triangular matrix.
[0038] To multiply the upper triangular inverse matrix by its conjugate transpose, the conjugate transpose matrix needs to be obtained first. In some embodiments, when the target decomposition process is a Cholesky decomposition process, the input matrix is a conjugate positive definite matrix. The matrix processing module transposes the first upper triangular inverse matrix to output the first lower triangular matrix, including: reading the elements of the first upper triangular inverse matrix row by row from the storage area; calculating the conjugate value of each read element; using the conjugate value as the element of the first lower triangular matrix, storing it column by column into the storage area, and outputting the first lower triangular matrix.
[0039] The matrix processing module performs a conjugate transpose operation. It reads each element of the first upper triangular inverse matrix row by row, calculates the conjugate value of each element, and then writes these conjugate values back to the storage area column by column. In this way, a column-stored matrix is generated. This matrix is the conjugate transpose of the first upper triangular inverse matrix, and structurally, it is a lower triangular matrix, i.e., the first lower triangular matrix. The transpose operation is performed because the theory of Cholesky decomposition shows that the inverse of a symmetric positive definite matrix can be obtained by multiplying its decomposed triangular matrix and its conjugate transpose.
[0040] Once the two multiplier matrices, namely the first upper triangular inverse matrix and the first lower triangular matrix, are ready, the matrix multiplication module is activated. The matrix multiplication module multiplies the first upper triangular inverse matrix with the first lower triangular matrix to output the target inverse matrix.
[0041] The matrix multiplication module is a hardware accelerator that performs the multiplication of two matrices. It can employ a highly parallel architecture, for example, including numerous multiply-accumulators that can simultaneously compute partial sums of multiple elements in the resulting matrix. The module supports block-based matrix computation to accommodate on-chip memory capacity. In the system, the matrix multiplication module receives input from the processing results of other modules; in the Cholesky flow, this involves multiplying the upper triangular inverse matrix by its conjugate transpose to obtain the lower triangular matrix.
[0042] If the top-level control module determines that the target decomposition process is the LU decomposition process, the initial step of the system is to activate the matrix decomposition module to perform LU decomposition. The matrix decomposition module performs LU decomposition on the input matrix to output a second upper triangular matrix and a second lower triangular matrix. In the LU decomposition, the matrix decomposition module outputs an upper triangular matrix and a lower triangular matrix at the same time.
[0043] like Figure 4 As shown, in some embodiments, when performing LU decomposition, the matrix factorization module obtains the second upper triangular matrix and the second lower triangular matrix through iterative calculation, including: calculating the squared modulus of multiple candidate elements in the current column of the input matrix, as shown in the following formula: ; in, Given the elements of the k-th column and k-th row of the input matrix; Select the maximum value from the squared modulus values of multiple candidate elements, and determine the diagonal elements of the second upper triangular matrix based on the maximum value; ; in, The diagonal elements of the second upper triangular matrix. , , Given the elements of the k-th column and k-th row of the input matrix; See the following formula, which calculates the multiplier for the current iteration step based on the diagonal elements. The multiplier is the quotient of the conjugate of the diagonal elements and the square of the modulus of the diagonal elements. ; in, These are the diagonal elements of the second upper triangular matrix; See the following formula, which updates the subsequent elements of the current column in the second lower triangular matrix according to the multiplier. The value of the subsequent element is the product of the corresponding element in the input matrix and the multiplier. ; in, The element in the k-th column and (k+1)-N-th row of the second lower triangular matrix. Given the elements of the input matrix in the k-th column and (k+1)-N-th row, These are the diagonal elements of the second upper triangular matrix; After swapping all elements in the row corresponding to the element with the maximum value of the modulus square with all elements in the row corresponding to the current iteration number in the input matrix, refer to the following formula to update the elements in the lower right rectangle of the input matrix. The updated value of the elements in the lower right rectangle is the original value minus the product of the current column element of the second lower triangular matrix and the current row element of the second upper triangular matrix.
[0044] ; in, For the elements in the (k+1)th row to the Nth row and the (k+1)th column to the Nth column of the bottom right rectangle, The updated elements for the bottom right rectangle. The element in the k-th column and (k+1)-N-th row of the second lower triangular matrix. It represents the element in the k-th row and (k+1)-N-th column of the second upper triangular matrix.
[0045] After obtaining the second lower triangular matrix, it cannot be directly used for subsequent inversion calculations because the triangular matrix inversion module is designed to process upper triangular matrices. Therefore, the matrix processing module needs to transform it. The matrix processing module reads the second lower triangular matrix and performs transformation processing on the second lower triangular matrix to output the third upper triangular matrix.
[0046] The matrix processing module plays a more diverse role in the LU decomposition process, including transforming lower triangular matrices into upper triangular matrices through conjugate transpose and padding with zeros and ones, as well as performing column rearrangement and storage format conversion on the inverse matrix. This module implements these functions through a configurable data path.
[0047] In some embodiments, when the target decomposition process is an LU decomposition process, the matrix processing module performs transformation processing on the second lower triangular matrix to output a third upper triangular matrix, including: performing a conjugate transpose operation on the second lower triangular matrix to output a conjugate transpose matrix; assigning 1 to the diagonal elements of the conjugate transpose matrix; and assigning 0 to the elements of the conjugate transpose matrix below the diagonal to generate and output the third upper triangular matrix.
[0048] Specifically, the transformation process consists of three steps. First, the second lower triangular matrix is transposed using its conjugate, which changes the order of the data. Next, all diagonal elements of the resulting matrix are set to the value 1. Finally, the elements of the strictly lower triangular portion of the resulting matrix are set to zero. After this series of operations, the original lower triangular matrix is transformed into a compliant upper triangular matrix, namely the third upper triangular matrix. This transformation step allows the matrix, originally of a lower triangular structure, to be processed by the unified triangular matrix inversion module.
[0049] In the LU process, the triangular matrix inversion module needs to be called twice, inverting the two upper triangular matrices respectively. The first call processes the second upper triangular matrix directly generated by the matrix decomposition module. The triangular matrix inversion module inverts the second upper triangular matrix to output the first inverse matrix. The triangular matrix inversion module works with the same algorithm as in the Cholesky process, taking the second upper triangular matrix as input and outputting its inverse matrix, i.e., the first inverse matrix.
[0050] The second call processes the third upper triangular matrix obtained by the matrix processing module. The triangular matrix inversion module inverts the third upper triangular matrix to output the second inverse matrix. The triangular matrix inversion module works again with the same algorithm, taking the third upper triangular matrix as input and outputting its inverse matrix, i.e., the second inverse matrix.
[0051] Under the control system's scheduling, the same physical hardware module processes different data at different times, completing two independent inversion operations. This is a manifestation of hardware reuse, avoiding the need for two separate circuits for the two inversion operations.
[0052] After the inversion operation is completed, the matrix processing module intervenes again to perform final formatting on the two inverse matrices. For the first inverse matrix, which is the inverse of the second upper triangular matrix, the matrix processing module performs a sequential storage transformation, rearranging its elements in row-major order as desired by matrix multiplication before storing them. For the second inverse matrix, which is the matrix obtained by inverting the third upper triangular matrix, the matrix processing module performs a column transformation.
[0053] like Figure 5 As shown, the column transformation is based on the row exchange information recorded during the initial selection of the pivot in the LU decomposition, which is stored in the form of a row index vector. In some embodiments, when the target decomposition process is an LU decomposition process, the matrix processing module performs column transformation on the second inverse matrix, including: obtaining the row index vector determined by the matrix decomposition module during the LU decomposition process, the row index vector being used to indicate the correspondence between the matrix columns before and after the column transformation; reading the elements of the second inverse matrix column by column from the storage area according to the row index vector; and storing each column element read into the storage area at the corresponding column position specified by the row index vector to obtain the transformed inverse matrix.
[0054] The matrix processing module rearranges the columns of the second inverse matrix to their correct positions based on this vector. Column transformations compensate for the row swaps performed during LU decomposition due to pivot selection, ensuring the correctness of the final inverse matrix result. Sequential storage transformations meet the input data storage format requirements of the matrix multiplication module, ensuring efficient parallel data retrieval.
[0055] Because the LU decomposition process includes a pivoting step, which involves swapping rows of the matrix, according to the principles of linear algebra, swapping rows of matrix A is equivalent to left-multiplying A by the permutation matrix P. Therefore, the LU decomposition of PA is PLU. Thus, the inverse of PA yields U. -1 L -1 P -1 And P -1 Equal to the transpose of P, its effect is to rearrange the columns of the inverse matrix. Therefore, in order to obtain U from the decomposition -1 and L -1 To calculate the inverse of the original matrix A, a corresponding column permutation must be applied to one of the inverse matrices to counteract the effect of the row exchange. In this embodiment, this operation is performed on the second inverse matrix.
[0056] At the start of the iterative computation of LU decomposition, each time the principal component logic decides to swap two rows of data, it not only swaps the matrix rows in memory, but also updates an internal state record, namely the row index vector, which records the cumulative effect of all row swaps.
[0057] After obtaining the row index vector, the address generator inside the matrix processing module takes the column index as input and queries the value at the corresponding position in the row index vector. This value indicates the position of the column of the second inverse matrix to be read in the original logical order. Based on this address, the control logic initiates a read request to the memory area. After receiving the read address and command, the controller of the memory area reads all elements of that column (from row 1 to row N) of the second inverse matrix sequentially and transmits them to the buffer of the matrix processing module via the data bus. The column-by-column reading method is used because column transformations are performed by moving the entire data column by column. This access mode matches the way the memory area organizes column data, enabling efficient data throughput.
[0058] After reading an entire column of data into the buffer, the matrix processing module stores each column element into the corresponding column position specified by the row index vector in the storage area. At this point, the address generator performs a reverse mapping, and the column number currently being processed (i.e., the target column number) is known. The address generator needs to find which position in the row index vector has an element value equal to the current target column number. This position number is the source column number corresponding to the data in the original second inverse matrix, and the current target column number is the target location where it should be stored. Therefore, for the data in the current buffer (which comes from the source column, such as the 3rd column), the address generator calculates the target column address where it should be written. The control logic then initiates a write request to the storage area, writing the data in the buffer into the physical storage location corresponding to the target column in row order.
[0059] This process repeats until all columns have been read and rewritten to their new locations. Finally, in memory, the column order of the second inverse matrix is rearranged, forming a new matrix after column transformation—the transformed inverse matrix. Essentially, this series of operations performs a permutation defined by the row index vector, thus completing the column correction of the inverse matrix at the hardware level.
[0060] After all preparations are complete, the matrix multiplication module multiplies the transformed inverse matrix with the first inverse matrix to output the target inverse matrix. Within the LU process, the matrix multiplication module multiplies the two inverse matrices after column transformations and format transformations. Regardless of the process, the final output of the matrix multiplication module is always the inverse matrix of the original input matrix, i.e., the target inverse matrix.
[0061] The system outputs the target inverse matrix, completing the LU decomposition and inversion process. In this process, the triangular matrix inversion module is reused twice, and the matrix multiplication module is reused once. They work together with the matrix processing module used for data rearrangement to maximize the sharing of hardware computing resources while ensuring the correctness of the calculation.
[0062] like Figure 6 as well as Figure 7 As shown, in some embodiments, the triangular matrix inversion module inverts the input upper triangular matrix through iterative calculation, including: calculating the diagonal elements of the output inverse matrix, where the value of each diagonal element is the reciprocal of the corresponding diagonal element of the input upper triangular matrix; updating the elements above the diagonal element of the current column in the output inverse matrix based on the diagonal elements of the output inverse matrix; and updating the elements in the upper right rectangular region of the input upper triangular matrix, where the updated value is the original value minus the product of the corresponding element in the current column of the output inverse matrix and the corresponding element in the current row of the input upper triangular matrix.
[0063] The diagonal elements of the output inverse matrix are calculated using the following formula: ; in, To output the diagonal elements of the inverse matrix, represents the diagonal elements of the upper triangular matrix, and k is the current iteration number; ; in, This represents the result of the elements in the upper right rectangle after iteration. It is the value before the iteration.
[0064] When the target decomposition process is the Cholesky decomposition process, the output inverse matrix is... The first upper triangular inverse matrix is the input upper triangular matrix. The first upper triangular matrix; when the target decomposition process is LU decomposition, the inverse matrix is output. The input upper triangular matrix is either the first inverse matrix or the second inverse matrix. It is either a second upper triangular matrix or a third upper triangular matrix.
[0065] The triangular matrix inversion module is a reusable computational unit in the system. Its task is to calculate the inverse of an upper triangular matrix according to an iterative algorithm. This module is designed to be general-purpose, meaning that its internal hardware circuitry and operational logic are fixed. When it is activated by the top-level control module, it executes the exact same calculation sequence regardless of whether the system is currently in the Cholesky process or the LU process, and regardless of which upper triangular matrix the input data comes from. This invariance is the basis for realizing hardware reuse. Before the module starts working, it needs to obtain parameters such as the starting storage address and order of the input matrix from the control bus, then automatically execute the complete iterative process, and issue an interrupt signal upon completion.
[0066] The algorithm design of this module makes full use of the mathematical properties of triangular matrix inversion, transforming the complex matrix inversion problem into a series of parallelizable scalar and vector operations, which is suitable for implementation using parallel multiply-accumulate arrays in modern digital integrated circuits, thereby achieving a very high computational throughput.
[0067] To improve the chip's operating frequency and timing convergence, in some embodiments, the top-level control module includes a status register. The status register is used to identify the system's computational state through different values. The status register is a set of binary storage units inside the top-level control module, which can be composed of multiple flip-flops. It is used to store an code representing the current working stage of the system. The number of bits in the register determines the number of states that can be distinguished. For example, a two-bit binary register can represent four different states.
[0068] The computation state refers to several different working stages that the system goes through during the matrix inversion task. The initial state represents the idle and ready stage after the system is powered on and reset or after a computation task is completed. At this time, all computation modules are in reset or low-power mode, waiting for new input matrices and computation commands.
[0069] The execution of the Cholesky decomposition state indicates that the system has started running the Cholesky decomposition algorithm. At this time, the matrix decomposition module is activated and configured in Cholesky calculation mode, and the relevant data channels are connected. The execution of the triangular matrix inversion state indicates that the system is currently performing an inversion operation on a certain triangular matrix. At this time, regardless of which main process is in, the triangular matrix inversion module will receive a work instruction.
[0070] The execution of the LU decomposition state indicates that the system is performing LU decomposition calculations, and the matrix decomposition module switches to the LU calculation mode, which includes the selection of the principal component. The definition of these states allows the complex continuous calculation process to be decomposed into a series of controllable and standardized hardware operation stages.
[0071] The values include a first value, a second value, a third value, and a fourth value; where the first value is used to represent the initial state, the second value is used to represent the Cholesky decomposition, the third value is used to represent the inversion of the triangular matrix, and the fourth value is used to represent the LU decomposition.
[0072] In one implementation, the first value can be set to binary "00" to represent the initial state. The second value can be set to binary "01" to represent performing Cholesky decomposition. The third value can be set to binary "10" to represent performing triangular matrix inversion. The fourth value can be set to binary "11" to represent performing LU decomposition. This encoding method is arbitrary, and other encoding schemes can also be used.
[0073] In this embodiment, the first value is "2'b00", which represents the initial state; the second value is "2'b01", which represents performing Cholesky decomposition; the third value is "2'b10", which represents performing triangular matrix inversion; and the fourth value can be "2'b11", which represents performing LU decomposition.
[0074] When the target decomposition process is the Cholesky decomposition process, the values of the status register are the first value, the second value, the third value, and the first value in sequence, that is, 2'b00->2'b01->2'b10->2'b00.
[0075] When the target decomposition process is the LU decomposition process, the values of the status register are, in sequence, the first value, the fourth value, the third value, the fourth value, the third value, the fourth value, and the first value, that is, 2'b00->2'b11->2'b10->2'b11->2'b10->2'b11->2'b00.
[0076] It can be seen that during the LU inversion, the calculation state changes to the triangular matrix inversion case twice. This is because the LU inversion requires inverting two triangular matrices, thus requiring the triangular matrix inversion module to be called twice.
[0077] It should be noted that the present invention encapsulates the matrix decomposition module, the triangular matrix inversion module, and the matrix multiplication module respectively, giving the sub-modules excellent portability. The top-level control module sets registers to control the sub-modules, realizing the reuse and reconfiguration of logic resources. This can greatly reduce the area resource overhead of the entire hardware system and maximize the utilization rate of each logic resource. This is also the main purpose of realizing the reconfigurable matrix inversion.
[0078] like Figure 8 , 9 As shown, in addition to the above, in some embodiments, the system also includes a storage module, which includes a first source data area, a second source data area, a result area, and an intermediate result area. The storage module is composed of multiple storage units, and each partition is composed of multiple independent storage units. The storage units enable different partitions or even different data blocks within the same partition to be accessed simultaneously, thereby improving data throughput.
[0079] For example, the area storing matrix elements is SRAM, which consists of 64 banks. Each bank is composed of four 64-bit wide and 1024-bit deep SRAM IPs, which can be spliced together for depth splicing and bit width splicing. Each partition consists of 16 banks.
[0080] The storage module is connected to each computing module in the system via an address bus and a data bus. The computing modules access data in the storage module by sending read / write commands and addresses. The management logic of the storage module is used to resolve these addresses, map them to specific memory banks and cells within those memory banks, and control data read / write operations.
[0081] Each of the first source data area, the second source data area, the result area, and the intermediate result area consists of a predetermined number of memory blocks. Each memory block is constructed from multiple static random access memory (SRAM) IP cores through depth concatenation and bit-width concatenation. The SRAM IP cores are pre-designed and verified integrated circuit modules with standard timing and interfaces. Depth concatenation allows multiple IP cores to be connected in series in the address space, forming a larger capacity memory block. Bit-width concatenation allows multiple IP cores to be connected in parallel on the data bits, forming a wider memory block.
[0082] The lower triangular matrix is stored in column-wise form, meaning an entire column of elements is stored in a single bank, with the address depths incremented. During transformations, the elements of the lower triangular matrix are transposed conjugately, and diagonal elements are padded with 1s, while the lower triangular portion is padded with zeros. First, elements retrieved from a bank are reassigned: if the current element is a diagonal element of the current column, it is assigned a value of 1; if the current element's address depth is greater than that of a diagonal element, it remains unchanged; otherwise, it is assigned a value of 0. Then, the reassigned data stream is rewritten into the bank, using a polling method. When writing to the same bank again, the address depth is increased by the matrix order.
[0083] like Figure 10 As shown, specifically, the storage procedure is explained below based on the inversion process. The input matrix is transmitted through the system's external interface. According to a predetermined strategy, the input matrix is stored in the second source data area. The selection of the second source data area as the starting storage location is intentional because the LU decomposition algorithm supports in-situ updates, meaning that matrix element updates during the decomposition process can directly overwrite the original values. Placing the input matrix in the second source data area allows the matrix decomposition module to use it as its workspace, directly reading data from this area and writing the iteratively updated matrix elements back to the same area, saving additional data handling overhead and storage space.
[0084] The matrix factorization module reads the input matrix from the second source data area and performs LU factorization calculations. During the factorization process, the data in the second source data area is continuously read, written, and modified. When the factorization is complete, the second source data area no longer stores the original input matrix, but rather a matrix that has undergone row swapping and partial updates, implicitly containing information about the final upper and lower triangular matrices. Simultaneously, the matrix processing module extracts the data of the lower triangular matrix from the second source data area and performs conjugate transpose, diagonal padding, and lower triangular padding with zeros. After the transformation, a new matrix is generated, namely the third upper triangular matrix. This newly generated matrix needs to be stored for subsequent inversion, but it is not suitable to be placed back into the second source data area currently being used as workspace to avoid data overwriting. Therefore, the system stores it in the result area.
[0085] Subsequently, the system needs to handle the inversion of two upper triangular matrices. First, it needs to invert the second upper triangular matrix obtained directly from LU decomposition. However, the data of the second upper triangular matrix is interleaved with the data of the lower triangular portion and stored in the updated matrix of the second source data region. To perform a pure upper triangular matrix inversion, the system controls the matrix processing module to operate on the data in the second source data region, setting all elements outside the upper triangular portion to zero, thereby "reconstructing" a strictly upper triangular matrix within the second source data region.
[0086] Next, the triangular matrix inversion module is invoked to read the zero-padded upper triangular matrix from the second source data area, perform calculations, and the resulting inverse matrix, i.e., the first inverse matrix, is written to the intermediate result area. The first inverse matrix is stored in the intermediate result area instead of the final result area because the final result area currently stores the third upper triangular matrix. These two inverse matrices need to be processed differently in subsequent steps, and placing them in different partitions can avoid access conflicts and create conditions for parallel processing.
[0087] While the first inverse matrix is being calculated and stored, another calculation path is also underway. The triangular matrix inversion module is also called to invert the third upper triangular matrix that has been stored in the result area. This module reads the data of the third upper triangular matrix from the result area, performs the inversion operation, and writes the resulting inverse matrix, i.e. the second inverse matrix, directly back to the result area, overwriting the original data of the third upper triangular matrix. This in-situ overwriting can further improve the utilization of storage space. Both inverse matrices have been calculated and are located in the intermediate result area and the result area, respectively.
[0088] The first inverse matrix stored in the intermediate result area needs to undergo sequential storage transformation to meet the matrix multiplication module's requirement for continuous input data storage. The matrix processing module reads the first inverse matrix from the intermediate result area, rearranges its elements to achieve row-major continuous storage, and then stores the transformed matrix into the first source data area. Simultaneously, the second inverse matrix stored in the result area needs column transformation to correct for the row swapping effect in LU decomposition. The matrix processing module similarly reads the second inverse matrix from the result area, rearranges its column order according to the row index vector, and then stores the transformed matrix into the now-empty second source data area. Through these two parallel data transfer and format conversion steps, the first and second source data areas each prepare an input matrix required for matrix multiplication, and their storage formats are optimized.
[0089] Finally, the matrix multiplication module simultaneously reads two data blocks of the inverse matrices, which have undergone format transformation, from both the first and second source data areas. Since the two source data areas are independent and their data is well distributed within the storage, the matrix multiplication module can efficiently acquire data in parallel. The multiply-accumulate array inside the module performs calculations, multiplying the two matrices to obtain the target inverse matrix of the original input matrix.
[0090] Based on the aforementioned reconstructable matrix inversion system supporting multiple matrix decomposition methods, some embodiments of this application provide a reconstructable matrix inversion method supporting multiple matrix decomposition methods, including: Based on the properties of the input matrix, the target decomposition process is determined, which may be either the Cholesky decomposition process or the LU decomposition process. When the target decomposition process is the Cholesky decomposition process, the input matrix is decomposed by Cholesky to output the first upper triangular matrix; the first upper triangular matrix is inverted to output the first upper triangular inverse matrix; the first upper triangular inverse matrix is transposed and rearranged to output the first lower triangular matrix; the first upper triangular inverse matrix is multiplied by the first lower triangular matrix to output the target inverse matrix; the first lower triangular matrix is a matrix that conforms to the data storage format. When the target decomposition process is an LU decomposition process, LU decomposition is performed on the input matrix to output a second upper triangular matrix and a second lower triangular matrix. The second lower triangular matrix is transformed to output a third upper triangular matrix. The second upper triangular matrix is inverted to output a first inverse matrix, and the third upper triangular matrix is inverted to output a second inverse matrix. The second inverse matrix is column-transformed to obtain a transformed inverse matrix. The transformed inverse matrix is multiplied by the first inverse matrix to output the target inverse matrix.
[0091] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A reconstructable matrix inversion system supporting multiple matrix decomposition methods, characterized in that, include: The module includes a top-level control module, a matrix decomposition module, a triangular matrix inversion module, a matrix processing module, and a matrix multiplication module. The top-level control module is used to determine the target decomposition process based on the attributes of the input matrix. The target decomposition process is either the Cholesky decomposition process or the LU decomposition process. When the target decomposition process is a Cholesky decomposition process, the matrix decomposition module performs Cholesky decomposition on the input matrix to output a first upper triangular matrix; the triangular matrix inversion module inverts the first upper triangular matrix to output a first upper triangular inverse matrix; the matrix processing module transposes and rearranges the first upper triangular inverse matrix to output a first lower triangular matrix; and the matrix multiplication module multiplies the first upper triangular inverse matrix with the first lower triangular matrix to output the target inverse matrix. The first lower triangular matrix is a matrix that conforms to the data storage format; When the target decomposition process is an LU decomposition process, the matrix decomposition module performs LU decomposition on the input matrix to output a second upper triangular matrix and a second lower triangular matrix. The matrix processing module performs transformation processing on the second lower triangular matrix to output a third upper triangular matrix. The triangular matrix inversion module inverts the second upper triangular matrix to output a first inverse matrix and inverts the third upper triangular matrix to output a second inverse matrix. The matrix processing module performs column transformation on the second inverse matrix to obtain a transformed inverse matrix. The matrix multiplication module multiplies the transformed inverse matrix with the first inverse matrix to output the target inverse matrix.
2. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, The top-level control module includes a status register, which is used to identify the computational state of the system through different values, including a first value, a second value, a third value, and a fourth value. The first value represents the initial state, the second value represents the Cholesky decomposition, the third value represents the triangular matrix inversion, and the fourth value represents the LU decomposition. When the target decomposition process is the Cholesky decomposition process, the values of the status register are, in sequence, the first value, the second value, the third value, and the first value; When the target decomposition process is an LU decomposition process, the values of the status register are, in sequence, the first value, the fourth value, the third value, the fourth value, the third value, the fourth value, and the first value.
3. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, When the target decomposition process is a Cholesky decomposition process, the input matrix is a conjugate positive definite matrix. The matrix processing module transposes the first upper triangular inverse matrix to output the first lower triangular matrix, including: Read the elements of the first upper triangular inverse matrix row by row from the storage area; Calculate the conjugate value of each of the read elements; The conjugate value is used as an element of the first lower triangular matrix, and stored column by column in the storage area to output the first lower triangular matrix.
4. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, When the target decomposition process is an LU decomposition process, the matrix processing module transforms the second lower triangular matrix to output the third upper triangular matrix, including: Perform a conjugate transpose operation on the second lower triangular matrix to output the conjugate transpose matrix; Assign the value 1 to the diagonal elements of the conjugate transpose matrix; The elements of the conjugate transpose matrix located below the diagonal are assigned the value 0 to generate and output the third upper triangular matrix.
5. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, When the target decomposition process is an LU decomposition process, the matrix processing module performs column transformations on the second inverse matrix, including: Obtain the row index vector determined by the matrix decomposition module during the LU decomposition process. The row index vector is used to indicate the correspondence between matrix columns before and after column transformation. Based on the row index vector, read the elements of the second inverse matrix column by column from the storage area; Each column element read is stored in the storage area, at the corresponding column position specified by the row index vector, to obtain the transformation inverse matrix.
6. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, The system also includes a storage module, which includes a first source data area, a second source data area, a result area, and an intermediate result area. The storage module is composed of multiple storage units. Each of the first source data area, the second source data area, the result area, and the intermediate result area is composed of a predetermined number of storage units. Each storage unit is composed of multiple static random access memory IP cores by depth concatenation and bit width concatenation. When the target decomposition process is an LU decomposition process, the input matrix is stored in the second source data area, and the matrix decomposition module reads data from the second source data area to perform LU decomposition; and the third upper triangular matrix is stored in the result area. The first inverse matrix is stored in the intermediate result area; The second inverse matrix is stored in the result area; After performing a sequential storage transformation on the first inverse matrix, it is stored in the first source data area; After performing column transformation on the second inverse matrix, it is stored in the second source data area; The matrix multiplication module reads the matrices from the first source data area and the second source data area and multiplies them to output the target inverse matrix.
7. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, When performing the Cholesky decomposition, the matrix decomposition module obtains the first upper triangular matrix through iterative calculation, including: Calculate the diagonal elements of the first upper triangular matrix, where the value of each diagonal element is the square root of the corresponding diagonal element of the input matrix; The multiplier for the current iteration step is calculated based on the diagonal elements, where the multiplier is the reciprocal of the square root of the diagonal elements; Update the subsequent elements of the row containing the diagonal element in the first upper triangular matrix according to the multiplier, wherein the value of the subsequent element is the product of the corresponding element in the input matrix and the multiplier; Update the elements in the lower right rectangular region of the input matrix. The updated value of the elements in the lower right rectangular region is the original value minus the product of the conjugate of the corresponding element in the current row of the first upper triangular matrix and the subsequent element.
8. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, When performing the LU decomposition, the matrix decomposition module obtains the second upper triangular matrix and the second lower triangular matrix through iterative calculation, including: Calculate the squared modulus of multiple candidate elements in the current column of the input matrix; The maximum value is selected from the squared modulus values of the plurality of candidate elements, and the diagonal elements of the second upper triangular matrix are determined based on the maximum value. The multiplier for the current iteration step is calculated based on the diagonal elements, where the multiplier is the quotient of the conjugate of the diagonal elements and the square of the modulus of the diagonal elements. Update the subsequent elements of the current column in the second lower triangular matrix according to the multiplier, where the value of the subsequent element is the product of the corresponding element in the input matrix and the multiplier; Swap all elements in the row corresponding to the element with the maximum value of the modulus square with all elements in the row corresponding to the current iteration number in the input matrix; Update the elements in the lower right rectangular area of the input matrix. The updated value of the elements in the lower right rectangular area is the original value minus the product of the corresponding element in the current column of the second lower triangular matrix and the corresponding element in the current row of the second upper triangular matrix.
9. The reconstructable matrix inversion system supporting multiple matrix decomposition methods according to claim 1, characterized in that, The triangular matrix inversion module inverts the input upper triangular matrix through iterative calculation, including: Calculate the diagonal elements of the output inverse matrix, where the value of each diagonal element is the reciprocal of the corresponding diagonal element of the input upper triangular matrix; Update the elements above the current column diagonal element in the output inverse matrix based on the diagonal elements of the output inverse matrix; Update the elements of the upper right rectangular region in the input upper triangular matrix. The updated value is the original value minus the product of the current column element in the output inverse matrix and the current row element in the input upper triangular matrix. Wherein, when the target decomposition process is the Cholesky decomposition process, the output inverse matrix is the first upper triangular inverse matrix, and the input upper triangular matrix is the first upper triangular matrix; When the target decomposition process is an LU decomposition process, the output inverse matrix is the first inverse matrix or the second inverse matrix, and the input upper triangular matrix is the second upper triangular matrix or the third upper triangular matrix.
10. A method for inverting a reconstructable matrix that supports multiple matrix decomposition methods, characterized in that, include: Based on the properties of the input matrix, the target decomposition process is determined, which is either the Cholesky decomposition process or the LU decomposition process. When the target decomposition process is a Cholesky decomposition process, Cholesky decomposition is performed on the input matrix to output a first upper triangular matrix; the first upper triangular matrix is inverted to output a first upper triangular inverse matrix. The first upper triangular inverse matrix is transposed and rearranged to output the first lower triangular matrix; the first upper triangular inverse matrix is multiplied by the first lower triangular matrix to output the target inverse matrix. The first lower triangular matrix is a matrix that conforms to the data storage format; When the target decomposition process is an LU decomposition process, the input matrix is decomposed into a second upper triangular matrix and a second lower triangular matrix, and the second lower triangular matrix is transformed to output a third upper triangular matrix. Invert the second upper triangular matrix to output the first inverse matrix, and invert the third upper triangular matrix to output the second inverse matrix; Perform column transformations on the second inverse matrix to obtain the transformed inverse matrix; multiply the transformed inverse matrix by the first inverse matrix to output the target inverse matrix.