GPU-based sparse triangle solution parallel optimization method and system
By adopting element-based hierarchical scheduling method on the GPU, the sparse triangle solution is optimized in parallel, which solves the problems of strong dependencies, high synchronization cost and low resource utilization in the existing technology, and achieves more efficient sparse triangle solution performance.
Patent Information
- Application Number
- CN202411576831.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-03-14
AI Technical Summary
The existing sparse triangle solution method based on GPU has problems such as strong dependencies, high global synchronization cost, low thread resource utilization and unbalanced task load during parallelization, resulting in the performance not meeting the actual application requirements.
The element-based hierarchical scheduling method is used to further split all rows, and all non-zero elements are used as scheduling objects. By determining the level of each non-zero element and performing sub-tasks based on the hierarchical division order, parallel solutions within the same level and inter-block synchronization solutions between different levels are realized.
The multi-threaded parallelism of sparse triangle solution on the GPU is improved, effectively avoiding the problems of load imbalance and low resource utilization, and significantly improving performance.
Smart Images

Figure CN119622172A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of high-performance parallel computing technology, and in particular to a GPU-based sparse triangle solution parallel optimization method and system. Background Art
[0002] Sparse triangular solution is a key operation in numerical linear algebra and plays an important role in many scientific and engineering computing fields, such as power flow calculation problems in power systems. Sparse triangular solution usually includes two operations: solving the sparse triangular equation system Ly=b and L T x = y, where L is a sparse lower triangular matrix, b is the right-hand side vector, and x = [x1 … x i … x n ] T ; Ly=b and L T x=y represents forward and backward substitution respectively. Forward substitution requires solving the equation system Ly=b to obtain the vector y, while backward substitution requires solving the equation system L T x=y gets vector x.
[0003] Over the past decade, graphics processing units (GPUs) have gradually developed into flexible and powerful many-core processors. Initially, GPUs were only specialized image processors, mainly used for graphics rendering and image processing. With the release of NVIDIA CUDA, the powerful performance provided by the massively parallel GPU architecture has been able to serve many high-performance computing applications. Many numerical algorithms can be significantly accelerated by GPUs, including sparse triangular solution operations. However, due to the strong dependencies between the various calculations of sparse triangular solution, its parallelization on GPUs is still limited: the current methods for accelerating sparse triangular solution based on GPUs mainly include level-set scheduling algorithms that require preprocessing operations and synchronization-free SpTRS that does not require preprocessing. V algorithm; among these methods, the horizontal scheduling algorithm usually divides the solution of unknowns into different levels, so that the unknowns in the same level can be solved at the same time, while different levels need to be executed sequentially; due to the dependencies between the levels, costly global synchronization operations must be introduced; it is worth noting that the horizontal scheduling method schedules each row of the triangular matrix, and does not deeply analyze the dependencies of all non-zero elements therein, so this method still has room for improvement; the synchronization-free SpTRSV algorithm uses atomic operations on the GPU to replace synchronization, avoiding excessive synchronization overhead, but this method often has problems such as low thread resource utilization and unbalanced task load; therefore, the performance of existing GPU-accelerated sparse triangular solution solutions cannot meet actual application requirements. Summary of the invention
[0004] In order to solve the above problems, the present disclosure proposes a GPU-based sparse triangle solution parallel optimization method and system, which can further improve the multi-threaded parallelism of sparse triangle solution on GPU, and can also effectively avoid load imbalance problems and low resource utilization problems.
[0005] According to some embodiments, the present disclosure adopts the following technical solutions:
[0006] The parallel optimization method for sparse triangle solving based on GPU includes:
[0007] Get the linear equations to be solved;
[0008] Decompose the sparse coefficient matrix in the linear equation system to obtain a triangular sparse matrix;
[0009] Based on the triangular sparse matrix, sparse triangular parallel solution is performed to obtain the final solution;
[0010] Among them, the sparse triangle parallel solution is to determine the level of each non-zero element according to the dependency between non-zero elements, and to divide the subtasks into sequential executions based on the levels. In a single subtask, the non-zero elements in the same level are solved in parallel, and the blocks in different levels are solved synchronously, and the final solution is obtained through the GPU kernel.
[0011] According to some embodiments, the present disclosure adopts the following technical solutions:
[0012] The GPU-based sparse triangle solution parallel optimization system includes acquisition module, decomposition module and solution module:
[0013] The acquisition module is configured to: acquire a linear equation system to be solved;
[0014] The decomposition module is configured to: decompose the sparse coefficient matrix in the linear equation system to obtain a triangular sparse matrix;
[0015] The solving module is configured to: perform sparse triangular parallel solving based on the triangular sparse matrix to obtain a final solution;
[0016] Among them, the sparse triangle parallel solution is to determine the level of each non-zero element according to the dependency between non-zero elements, and to divide the subtasks into sequential executions based on the levels. In a single subtask, the non-zero elements in the same level are solved in parallel, and the blocks in different levels are solved synchronously, and the final solution is obtained through the GPU kernel.
[0017] According to some embodiments, the present disclosure adopts the following technical solutions:
[0018] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the parallel optimization method for sparse triangle solution based on GPU is implemented.
[0019] According to some embodiments, the present disclosure adopts the following technical solutions:
[0020] A non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the GPU-based sparse triangle solution parallel optimization method is implemented.
[0021] According to some embodiments, the present disclosure adopts the following technical solutions:
[0022] An electronic device comprises: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes the GPU-based sparse triangle solution parallel optimization method.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] The GPU-based sparse triangular solution parallel optimization method disclosed in the present invention adopts a novel element-based hierarchical scheduling method, which realizes calculation by further splitting all rows and taking all non-zero elements therein as scheduling objects. It can not only further improve the multi-threaded parallelism of sparse triangular solution on GPU, but also effectively avoid the problems of load imbalance and low resource utilization, thereby significantly improving performance.
[0025] The disclosed GPU-based parallel optimization method for sparse triangle solving designs an efficient hybrid inter-block synchronization method, which realizes sequential solving between levels by combining a grid-level synchronization method and restarting the kernel. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0027] Figure 1 This is a flow chart of a parallel optimization method for GPU-based sparse triangle solution according to an embodiment of the present disclosure.
[0028] Figure 2 This is an example diagram of a sparse lower triangular matrix according to an embodiment of the present disclosure.
[0029] Figure 3 This is an example diagram of layer data according to an embodiment of the present disclosure.
[0030] Figure 4 This is a calculation flow chart of the update phase of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0032] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0033] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0034] Example 1
[0035] In one embodiment of the present disclosure, a parallel optimization method for sparse triangular solution based on GPU is provided. Taking the power flow calculation problem in the power system as an example, the matrix composed of the admittance on the branch where each node of the power grid is located in the power flow calculation is used as the sparse coefficient matrix A to be solved, and the injected power of each node of the power grid is used as the right-hand vector b. The voltage x of each node is solved by the linear equation group Ax=b; the parallel optimization method for sparse triangular solution based on GPU of the present disclosure can further improve the multi-threaded parallelism of sparse triangular solution on GPU, and can also effectively avoid the problem of load imbalance and low resource utilization, such as Figure 1 As shown, the specific implementation process is as follows:
[0036] Step 1: Obtain the linear equation system Ax=b describing the grid node voltage.
[0037] A is a sparse matrix composed of the admittance of each branch of the power grid where each node is located in the power flow calculation, b is a vector composed of the injected power of each node in the power grid, and x is the voltage of each node to be solved.
[0038] Step 2: Decompose the sparse coefficient matrix A in the linear equation system to obtain the triangular sparse matrix L.
[0039] Specifically, the lower triangular sparse matrix L is obtained through LU decomposition or Cholesky decomposition.
[0040] Through the above decomposition, we can obtain two sparse triangular equations Ly = b and LT x = y, where L is a sparse lower triangular matrix, b is the right - hand side vector, and x = [x1 … x i … x n T represents the voltages of n nodes.
[0041] Step 3: Based on the triangular sparse matrix L, perform sparse triangular parallel solution to obtain the final solution x, which is used as the voltage of each node in the power grid.
[0042] Among them, the sparse triangular parallel solution is a subtask that determines the level where each non - zero element is located according to the dependency relationship between non - zero elements and is executed based on the level division order. Within a single subtask, the non - zero elements within the same level are solved in parallel, and the inter - block synchronization solution is adopted between different levels. The final solution is obtained through the kernel of the GPU.
[0043] Specifically, Ly = b and L T x = y represent forward and backward substitution respectively. Forward substitution requires solving the system of equations Ly = b to obtain the vector y, while backward substitution substitutes the obtained vector y into L T x = y, that is, y is used as the right - hand side vector of L T x = y, and solve the system of equations L T x = y to obtain the final solution x.
[0044] Because L T is the transpose matrix of the sparse lower triangular matrix L, so L T is a sparse upper triangular matrix. The separate solutions of Ly = b and L T x = y both adopt a similar sparse triangular equation solving process. Taking Ly = b as an example below, the solving process of the sparse triangular equation is described as follows:
[0045] Step 1: Obtain the sparse triangular equation Ly = b to be solved.
[0046] Taking the sparse lower triangular matrix L with a dimension of 8×8 as shown in Figure 2 as an example, that is, n = 8. The black dots are the non - zero diagonal elements L i,i , abbreviated as L i , and the red dots are the non - zero non - diagonal elements L i,j , 0 < < i, j < < 7, and the values in other positions are all zero.
[0047] Step 2: Pre - process the triangular sparse matrix L, determine the level where each non - zero element is located according to the dependency relationship between non - zero elements, and construct the layer data of the triangular sparse matrix.
[0048] Specifically, step 2.1: traverse the non-zero elements of the triangular sparse matrix to determine the level of each non-zero element, specifically:
[0049] (1) The final level of the diagonal elements is set to 0;
[0050] (2) Based on the hierarchy of diagonal elements and the dependency relationship between non-zero elements, a two-level setting method is used to set the hierarchy of non-diagonal elements:
[0051] Take the maximum value of the level of all non-zero elements on the row of the diagonal element with the same column index as the non-diagonal element l, and set it as the initial level of the non-diagonal element l;
[0052] Based on the initial level, if there are other non-zero elements of the same level as the non-diagonal element l in the row where the non-diagonal element l is located, then add 1 to the current level to get the final level.
[0053] Step 2.2: Construct the layer data of the triangular sparse matrix
[0054] The layer data, including the value, row index, column index and level of each non-zero element, is stored in four arrays LV, LI, LJ and LS. LV, LI and LJ are respectively used to store the value, row index and column index of non-zero elements arranged in ascending order of level. LS is used to store the index of the first non-zero element of each level in the LV, LI and LJ arrays.
[0055] Provides a specific way to construct layer data, including:
[0056] Step 2.0: First, create a levellist empty array linked list whose size is the same as the number of matrix rows n, which is used to store the level information of all non-zero elements.
[0057] The operations of the levellist linked list are performed by the following three functions: INITIAL_LEVEL, FINAL_LEVEL and INSERT. The INITIAL_LEVEL function is used to determine the initial level of the current non-zero element, the FINAL_LEVEL function is used to determine the final level of the current non-zero element, and the INSERT function is used to update the levellist.
[0058] Step 2.1: Traverse the non-zero elements of the triangular matrix. The traversal order of the lower triangular matrix is from top to bottom and from left to right, and the traversal order of the upper triangular matrix is from bottom to top and from right to left. For the current non-zero element l being traversed:
[0059] If l is a diagonal element, its final level is simply set to 0.
[0060] If l is a non-diagonal element, a two-level setting is used:
[0061] (1) Call the INITIAL_LEVEL function to determine the initial level of l.
[0062] Find the maximum value of all non-zero elements in the levellist linked list on the row with the same diagonal element index as the column index of l. This is the initial level of l. If there are only diagonal elements in the corresponding row, the initial level is 0.
[0063] (2) Call the FINAL_LEVEL function to determine the final level of l.
[0064] First, add 1 to the initial level, that is, let Level = level + 1, where level is the initial level and Level is the current level.
[0065] Then, check whether there are other non-zero elements with level Level in levellist on the current row. If so, add 1 to Level and restart the search until there is no conflict. The purpose of this method is to avoid non-zero elements in a row being classified into the same level.
[0066] When the level of the non-zero element l is determined, the INSERT function needs to be called to update the levellist linked list. In addition, the corresponding data of the non-zero element l needs to be saved in the layer data array, including the value of the non-zero element l, the row index, the column index, and the final level Level just determined.
[0067] Step 2.2: Update layer data
[0068] The storage format of layer data is similar to the CSR format. Four arrays LV, LI, LJ and LS need to be created. LV, LI and LJ are used to store the values, row index and column index of non-zero elements respectively. Since the LV, LI and LJ arrays bring together the scattered non-zero elements in the same layer, efficient data access can be achieved. The LS array is used to store the index of the first non-zero element of each layer in the LV, LI and LJ arrays. Through the LS array, the starting and ending positions of each layer can be effectively determined, as shown in the following figure. Figure 3 LV, LI, LJ and LS shown.
[0069] Figure 3 In the figure, different colors represent different levels. Red, dark green, light green and yellow represent levels 0, 1, 2 and 3 respectively, and blue is the end mark.
[0070] Step 3: Based on the layer data, the initial value of the unknown solution is calculated in parallel through the GPU core, which is the initial value stage.
[0071] The parallel calculation of the initial value of the unknown solution is to use the diagonal elements of level 0 to divide the right end vector by the value of the diagonal element to parallelly calculate each y i The initial value of .
[0072] Specifically, the kernel of the initialization phase is different from that of the update phase. The calculation mode of the two phases is different, but it only needs to be performed once. The initialization phase only involves the calculation of diagonal elements, that is, all elements of the 0th level. Its calculation content is mainly two-number division and assignment operations. Therefore, the parallelization of this part is relatively simple, and only the scale of computing resources needs to be considered; the number of diagonal elements is n, and the block size is set to 1024. Then the grid size gridsize can be obtained by set up.
[0073] When the kernel performs the initialization, three parameters need to be passed in, namely the element value array LV, the array Array_y storing the unknown solution y, and the array Array_b storing the right vector b. In step S2, all diagonal elements L i They are stored in the 0th level of LV in order, so the diagonal elements L of the triangular matrix can be directly accessed through the index i and LV i ,y i The initial value of is expressed as:
[0074] Array_y[i]=Array_b[i] / L i
[0075] Step 4: Based on the initial value and layer data of the unknown solution, the solution task is divided into multiple subtasks to be executed sequentially. In a single subtask, non-zero elements in the same layer are solved in parallel, and blocks in different layers are solved synchronously. The final solution y is obtained through the GPU kernel solution, that is, y i update phase.
[0076] Specifically, step 4.1: dividing the solution task into multiple subtasks to be executed sequentially is to merge multiple levels whose number of non-zero elements meets the preset conditions into one subtask through the sliding window method while maintaining the order between levels, thereby obtaining multiple subtasks.
[0077] The idea of dividing subtasks is to merge multiple layers with similar numbers of non-zero elements into one task while maintaining the order between layers, thereby obtaining multiple subtasks. This is actually a data segmentation problem. This embodiment divides the data by a sliding window method.
[0078] First, the data set array Array_num consisting of the number of non-zero elements in each level is obtained through the level index array LS. The number of levels is t (excluding the 0th level). In the example of this embodiment, the number of non-zero elements in the 1st, 2nd and 3rd levels is 3, 2 and 3 respectively. t=3, Array_num=[3,2,3]. Array_num is slidingly taken as a window, and the window size is dynamically set to The mobile window size is set to The threshold range ε is set to 0.75<ε<1.25, and the value to be calculated is the average number of non-zero elements in the window.
[0079] When the average value of the i-th window is a and the average value of the (i+1)-th window is b, if the value of b / a is not within the preset threshold range ε, it means that the average value of the (i+1)-th window has changed significantly relative to the data value of the i-th window. Therefore, it is necessary to segment at the beginning of the (i+1)-th window and record the level in the Partitioned_array array; repeat the above process until all arrays Array_num are segmented and the partitioned array Partitioned_array is obtained; in addition, the statistical value of variance can also be considered.
[0080] Step 4.1: In a single subtask, the non-zero elements in the same level are solved in parallel, and the blocks in different levels are solved synchronously. The final solution y is obtained through the GPU kernel solution, wherein the synchronous solution between blocks is achieved through a grid-level synchronization method.
[0081] In a single subtask, there may be multiple levels, so a hybrid inter-block synchronization method is designed, specifically:
[0082] At the same time node, only one cooperative kernel can perform calculations; within a subtask, inter-block synchronization is implemented through a grid-level synchronization method; unlike ordinary kernel launches, the grid-level synchronization method is called through the GPU's cudaLVunchCooperativeKernel() API, and synchronization is implemented through the sync() API during execution; between subtasks, inter-block synchronization is implemented by restarting the cooperative kernel; in order to reduce synchronization overhead and improve resource utilization efficiency, the following methods are designed: Figure 4 The execution mode shown:
[0083] (1)Thread configuration.
[0084] In a single subtask, the number of threads is fixed. Assuming that in a single subtask, the total number of non-zero elements in these levels is z, the number of levels is m, and the block size is set to 1024, then the grid size gridsize can be obtained by To set; therefore, for different subtasks, due to the different total number of non-zero elements z and the number of levels m inside them, the size of gridsize is also different.
[0085] (2) Enable the collaborative kernel to perform the calculation of a single subtask.
[0086] Within a single level, update y with gridsize threads and all non-zero elements in that level i After the calculation of the current level is completed, the synchronization between levels within a single subtask is performed through the sync() function until all levels within the current subtask complete the calculation, at which point the collaborative kernel execution ends.
[0087] (3) If there are still subtasks that have not been calculated, return to step (1); otherwise, exit the calculation and output the results.
[0088] Example 2
[0089] In one embodiment of the present disclosure, a GPU-based sparse triangle solution parallel optimization system is provided, including an acquisition module, a decomposition module and a solution module:
[0090] The acquisition module is configured to: acquire a linear equation system to be solved;
[0091] The decomposition module is configured to: decompose the sparse coefficient matrix in the linear equation system to obtain a triangular sparse matrix;
[0092] The solving module is configured to: perform sparse triangular parallel solving based on the triangular sparse matrix to obtain a final solution;
[0093] Among them, the sparse triangle parallel solution is to determine the level of each non-zero element according to the dependency between non-zero elements, and to divide the subtasks into sequential executions based on the levels. In a single subtask, the non-zero elements in the same level are solved in parallel, and the blocks in different levels are solved synchronously, and the final solution is obtained through the GPU kernel.
[0094] Example 3
[0095] In one embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the GPU-based sparse triangle solution parallel optimization method is implemented.
[0096] Example 4
[0097] In one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the GPU-based sparse triangle solution parallel optimization method is implemented.
[0098] Example 5
[0099] In one embodiment of the present disclosure, an electronic device is provided, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the GPU-based sparse triangle solution parallel optimization method.
[0100] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0102] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A parallel optimization method for sparse triangle solving based on GPU, characterized in that: include: Get the linear equations to be solved; Decompose the sparse coefficient matrix in the linear equation system to obtain a triangular sparse matrix; Based on the triangular sparse matrix, sparse triangular parallel solution is performed to obtain the final solution; Among them, the sparse triangle parallel solution is to determine the level of each non-zero element according to the dependency between non-zero elements, and to divide the subtasks into sequential executions based on the levels. In a single subtask, the non-zero elements in the same level are solved in parallel, and the blocks in different levels are solved synchronously, and the final solution is obtained through the GPU kernel.
2. The GPU-based parallel optimization method for sparse triangle solving according to claim 1, characterized in that: The sparse triangle parallel solution, the specific steps are: Preprocess the obtained triangular sparse matrix, determine the level of each non-zero element according to the dependency relationship between the non-zero elements, and construct the layer data of the triangular sparse matrix; Based on the layer data, the initial values of the unknown solutions are calculated in parallel by the GPU cores; Based on the initial value and layer data of the unknown solution, the solution task is divided into multiple subtasks that are executed sequentially. Within a single subtask, non-zero elements in the same level are solved in parallel, and blocks between different levels are solved synchronously. The final solution is obtained through the GPU kernel solution.
3. The GPU-based sparse triangle solution parallel optimization method according to claim 2, characterized in that: Determining the level of each non-zero element is to traverse the non-zero elements of the triangular sparse matrix as follows: The final level of diagonal elements is set to 0; Based on the levels of the diagonal elements, the levels of the off-diagonal elements are set according to the dependencies between the non-zero elements.
4. The GPU-based parallel optimization method for sparse triangle solving according to claim 3, characterized in that: The level of setting the non-diagonal elements is set in two levels, specifically: Filter the diagonal elements with the same column index as the non-diagonal elements to be set, take the maximum value of the level of all non-zero elements in the row where the diagonal elements are located, and set it as the initial level of the non-diagonal elements; Based on the initial level, if there are other non-zero elements of the same level as the non-diagonal elements in the row where the non-diagonal elements to be set are located, then add 1 to the current level to get the final level.
5. The GPU-based sparse triangle solution parallel optimization method according to claim 2, characterized in that: The parallel calculation of the initial value of the unknown solution is to use the diagonal elements of level 0 to divide the right end vector by the value of the diagonal element to parallelly calculate each y i The initial value of .
6. The GPU-based sparse triangle solution parallel optimization method according to claim 2, characterized in that: The solution task is divided into multiple subtasks to be executed sequentially, and a sliding window method is used to merge multiple levels whose number of non-zero elements meets preset conditions into one subtask while maintaining the order between levels, thereby obtaining multiple subtasks.
7. The GPU-based parallel optimization method for sparse triangle solving as claimed in claim 2, characterized in that: The inter-block synchronous solution is achieved through a grid-level synchronization method.
8. GPU-based sparse triangle solution parallel optimization system, characterized by: Including acquisition module, decomposition module and solution module: The acquisition module is configured to: acquire a linear equation system to be solved; The decomposition module is configured to: decompose the sparse coefficient matrix in the linear equation system to obtain a triangular sparse matrix; The solving module is configured to: perform sparse triangular parallel solving based on the triangular sparse matrix to obtain a final solution; Among them, the sparse triangle parallel solution is to determine the level of each non-zero element according to the dependency between non-zero elements, and to divide the subtasks into sequential executions based on the levels. In a single subtask, the non-zero elements in the same level are solved in parallel, and the blocks in different levels are solved synchronously, and the final solution is obtained through the GPU kernel.
9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by the processor, the GPU-based sparse triangle solution parallel optimization method as described in any one of claims 1-7 is implemented.
10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the GPU-based sparse triangle solution parallel optimization method as described in any one of claims 1-7.
Citation Information
Cited By
Structural finite element stiffness equation parallel super-node sparse triangle solving method
CN119962321A
Aircraft simulation method, device and equipment based on parallel block sparse matrix incomplete LU decomposition and medium
CN121051876A