A method and device for solving based on GPU multi-thread concurrent technology
Patent Information
- Application Number
- CN202311363863.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-10-20
AI Technical Summary
由于CFD计算具有复杂性和计算密集性,其求解过程往往需要大量的计算资源和时间
Smart Images

Figure CN117492981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computational fluid dynamics, and more particularly to a solution acceleration method and apparatus based on GPU multithreaded concurrency technology. Background Technology
[0002] OpenFOAM is an open-source CFD (Computational Fluid Dynamics) software widely used to simulate fluid dynamics phenomena such as eddies, heat transfer, and aerodynamics. ReactingFoam is a commonly used solver within OpenFOAM for combustion and chemical reactions. Due to the complexity and computational intensity of CFD calculations, the solution process often requires significant computational resources and time.
[0003] Currently, the common method for CFD calculations is to use MPI to perform partial code parallelism on multi-core servers. However, as the amount of computation increases, the solution speed has become a problem due to limitations in CPU computing power and the number of cores in the server configuration. Summary of the Invention
[0004] This invention provides a solution acceleration method and apparatus based on GPU multi-threaded concurrency technology to improve the efficiency of CFD calculation and solution while ensuring the normal operation of the CPU.
[0005] To address the aforementioned technical problems, this invention provides a solution acceleration method based on GPU multithreaded concurrency technology, comprising the following steps:
[0006] The system acquires and determines whether the data to be solved contains chemical terms. If the data to be solved contains chemical terms, the system determines the number of solutions to the data to be solved and integrates the data to be solved and the number of solutions to generate corresponding solutions to be solved, which are then sent to the GPU processing module.
[0007] The GPU processing module is controlled to parse the task to be solved, and the data to be solved is divided into several tasks according to the number of tasks obtained from the parsing. Then, several threads are generated according to the several tasks and the threads are solved concurrently to obtain several solution data.
[0008] The solution acceleration method provided by this invention first judges the obtained data to be solved to determine whether it contains chemical terms, that is, to determine whether CFD calculations exist. If CFD calculations are determined, the number of solution tasks in the data to be solved is determined. The determined number of solution tasks and the data to be solved are integrated into solution tasks and sent to the GPU processing module. The GPU processing module performs solution processing on the solution tasks. In this way, the solution data is partially processed by the GPU chip, which reduces the computing pressure on the system CPU chip and improves the computing efficiency of the server.
[0009] After receiving a task to be solved, the GPU first parses the task and divides it into several tasks based on the number of tasks. Then, it generates a corresponding number of solution threads for each task, allowing the GPU to perform concurrent solving on these threads to obtain several solutions. Compared to serial computation by the CPU, concurrent computation by the GPU reduces the time required for CFD calculations, thereby improving CFD solution efficiency. Simultaneously, since the entire concurrent computation process is executed by the GPU, it also improves the CPU's computational efficiency, ensuring its normal operation.
[0010] As a preferred example, determining the solution task data volume of the data to be solved specifically involves:
[0011] The data to be solved is divided according to the number of grid tasks. Each grid task corresponds to one solution task. If the amount of data to be solved is less than one grid task, it is divided according to one grid task. This process continues until the data to be solved is divided. The number of grid tasks is then calculated, and the total number of grids obtained is taken as the number of solution tasks.
[0012] Since GPU concurrent computing is executed through multi-threading, the solution acceleration method provided by this invention determines the number of solution tasks for the data to be solved by dividing it into grid task quantities. The data to be solved is divided into several solution tasks according to the task data that each grid task quantity can carry, with each grid task quantity corresponding to one solution task, until all data in the data to be solved has been divided.
[0013] If the remaining data volume is insufficient for a single grid task, the remaining data volume will be divided according to the required grid task size. After the division, the system will calculate the number of grid tasks and use this number as the number of solution tasks for subsequent GPU task division.
[0014] As a preferred example, before the GPU processing module is controlled to parse the task to be solved, the method further includes:
[0015] The number of threads is determined based on the amount of data to be solved, and the memory of the GPU processing module is adjusted according to the determined number of threads so that the adjusted free memory can meet the needs of the threads corresponding to the number of threads to perform concurrent solving calculations.
[0016] Simultaneously, based on the number of threads, the blank memory is divided into several thread memory areas corresponding to the number of threads, and several memory addresses corresponding to the several thread memory areas are determined.
[0017] Before the GPU receives and parses the task to be solved, the system will determine the number of threads to be prepared based on the number of tasks to be solved, and adjust the memory space in the GPU chip according to the determined number of threads. This will ensure that the free memory space in the chip is sufficient to receive the task to be solved, thereby improving the success rate of receiving the task to be solved and avoiding the failure of receiving the task to be solved due to insufficient free memory in the GPU chip, which would lead to errors in the system processing the data to be solved.
[0018] At the same time, the system will divide the adjusted blank memory into thread memory corresponding to the number of threads according to the determined number of threads, and then determine the memory address corresponding to the above multiple thread memory. This provides data support for the subsequent system to allocate the running address for solving several solving tasks, which facilitates the subsequent system to allocate solving tasks and improves the efficiency and accuracy of the system to allocate solving tasks.
[0019] As a preferred example, the step of generating a plurality of solution threads based on the plurality of solution tasks and performing concurrent solution operations on the plurality of solution threads specifically includes:
[0020] The plurality of solving tasks are parsed and encoded to obtain the corresponding plurality of solving threads, and the solving instructions of the plurality of solving threads are determined.
[0021] The association between the plurality of solving threads and the plurality of memory addresses is determined, and the plurality of solving threads are allocated to the plurality of thread memory locations according to the memory addresses corresponding to the determined association, so that the plurality of thread memory locations receive the plurality of solving threads and perform concurrent solving according to the corresponding solving instructions.
[0022] When the GPU chip receives the task to be solved and divides it into several tasks, the system will parse these tasks and encode them one by one to obtain several solution threads that can be solved concurrently by the GPU chip. The system will also determine the solution instructions corresponding to each of these solution threads, so that the system can control each solution thread to perform concurrent solution calculations.
[0023] Upon receiving instructions, the system will determine the association between each solver thread and its memory address. Based on this association, the system will allocate the solver thread to the corresponding thread memory address, allowing the thread memory to receive the solver thread and perform concurrent solves according to its solver instructions. Since the solver described in this invention is a concurrent solver, the aforementioned solver threads will perform solves simultaneously. This multi-threaded concurrent solver technology using GPU improves the system's computational efficiency for CFD calculations.
[0024] As a preferred example, after obtaining several solution data points, the method further includes:
[0025] Receive the plurality of solution data sent by the GPU processing module, and provide feedback on the data to be solved based on the plurality of solution data;
[0026] Simultaneously, a reset operation is performed on the memory space of the GPU processing module until the GPU processing module receives the task to be solved.
[0027] After completing the solution process and obtaining several solution data, the system will provide the user with the solution data corresponding to the input data to be solved, and reset the GPU chip in preparation for the next concurrent GPU solution calculation.
[0028] Accordingly, the present invention also provides a solution acceleration device based on GPU multi-threaded concurrency technology, the solution acceleration device comprising a task generation unit and a task solving unit;
[0029] The task generation unit is used to acquire and determine whether there are chemical terms in the data to be solved. If it is determined that there are chemical terms in the data to be solved, the number of tasks to be solved for the data to be solved is determined, and the data to be solved and the number of tasks to be solved are integrated to generate corresponding tasks to be solved and sent to the GPU processing module.
[0030] The task-solving unit is used to control the GPU processing module to parse the task to be solved, and divide the data to be solved into several tasks according to the number of tasks obtained from the parsing. Then, it generates several threads according to the several tasks and performs concurrent solving on the several threads to obtain several solution data.
[0031] As a preferred example, the task generation unit determines the amount of solution task data of the data to be solved, specifically as follows:
[0032] The data to be solved is divided according to the number of grid tasks. Each grid task corresponds to one solution task. If the amount of data to be solved is less than one grid task, it is divided according to one grid task. This process continues until the data to be solved is divided. The number of grid tasks is then calculated, and the total number of grids obtained is taken as the number of solution tasks.
[0033] As a preferred example, the task-solving unit further includes, before the GPU processing module is controlled to parse the task, the following:
[0034] The number of threads is determined based on the amount of data to be solved, and the memory of the GPU processing module is adjusted according to the determined number of threads so that the adjusted free memory can meet the needs of the threads corresponding to the number of threads to perform concurrent solving calculations.
[0035] Simultaneously, based on the number of threads, the blank memory is divided into several thread memory areas corresponding to the number of threads, and several memory addresses corresponding to the several thread memory areas are determined.
[0036] As a preferred example, the task-solving unit generates a plurality of corresponding solving threads based on the plurality of solving tasks and performs concurrent solving on the plurality of solving threads, specifically as follows:
[0037] The plurality of solving tasks are parsed and encoded to obtain the corresponding plurality of solving threads, and the solving instructions of the plurality of solving threads are determined.
[0038] The association between the plurality of solution threads and the plurality of memory addresses is determined, and the plurality of solution threads are allocated to the plurality of memory addresses according to the determined association, so that the plurality of empty memory addresses receive the plurality of solution threads and perform concurrent solutions according to the corresponding solution instructions.
[0039] As a preferred example, after obtaining several solution data, the task generation unit further includes:
[0040] Receive the plurality of solution data sent by the GPU processing module, and provide feedback on the data to be solved based on the plurality of solution data;
[0041] Simultaneously, a reset operation is performed on the memory space of the GPU processing module until the GPU processing module receives the task to be solved. Attached Figure Description
[0042] Figure 1 : A flowchart illustrating an embodiment of the solution acceleration method based on GPU multithreaded concurrency technology provided by the present invention;
[0043] Figure 2 : A schematic diagram of an embodiment of the solution acceleration device based on GPU multi-threaded concurrency technology provided by the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Example 1
[0046] Please refer to Figure 1 This is a flowchart illustrating an embodiment of the solution acceleration method based on GPU multi-threaded concurrency technology provided by the present invention, including steps 101 to 102, each step being as follows:
[0047] Step 101: Obtain and determine whether there are chemical terms in the data to be solved. If it is determined that there are chemical terms in the data to be solved, determine the number of solving tasks for the data to be solved, and integrate the data to be solved and the number of solving tasks to generate corresponding solving tasks and send them to the GPU processing module.
[0048] The solution acceleration method provided in this embodiment of the invention first judges the obtained data to be solved to determine whether it contains chemical terms, that is, to determine whether CFD calculations exist. If CFD calculations are determined to exist, the number of solution tasks in the data to be solved is determined. The determined number of solution tasks and the data to be solved are integrated into a solution task and sent to the GPU processing module. The GPU processing module performs the solution task processing. In this way, the solution data is partially processed by the GPU chip, which reduces the computing pressure on the system CPU chip and improves the computing efficiency of the server.
[0049] In this embodiment, the GPU processing module, i.e., the GPU chip, serves as a high-performance parallel computing device with the capability of massively parallel processing, which can significantly improve computing speed. Therefore, to improve computing efficiency, this embodiment applies GPU concurrent computing technology to the reactingFoam solver in OpenFOAM, thereby accelerating the running speed of the chemical term solver in the data to be solved in this embodiment.
[0050] For example, in this embodiment, determining the solution task data volume of the data to be solved specifically involves:
[0051] The data to be solved is divided according to the number of grid tasks. Each grid task corresponds to one solution task. If the amount of data to be solved is less than one grid task, it is divided according to one grid task. This process continues until the data to be solved is divided. The number of grid tasks is then calculated, and the total number of grids obtained is taken as the number of solution tasks.
[0052] Since GPU concurrent computing is executed through multi-threading, the solution acceleration method provided in this embodiment of the invention determines the number of solution tasks for the data to be solved by dividing it into grid task quantities. The data to be solved is divided into several solution tasks according to the task data that each grid task quantity can carry, with each grid task quantity corresponding to one solution task, until all data in the data to be solved has been divided.
[0053] If the remaining data volume is insufficient for a single grid task, the remaining data volume will be divided according to the required grid task size. After the division, the system will calculate the number of grid tasks and use this number as the number of solution tasks for subsequent GPU task division.
[0054] In this embodiment, if the number of grid tasks in the data to be solved is N, and existing technology is used to iteratively solve these N tasks, N iterations are required. Let T(s) be the time consumed in each iteration, then the total time to complete the calculation of these N tasks is N*T(s). However, if the solution acceleration method provided in this embodiment divides the data to be solved into N tasks according to the number of grid tasks, and assigns these N tasks to the GPU processing module to generate corresponding N solution threads, allowing the GPU chip to perform concurrent calculations on these N threads, the solution can be completed concurrently in one operation, effectively improving the solution efficiency and speed.
[0055] Step 102: Control the GPU processing module to parse the task to be solved, and divide the data to be solved into several tasks according to the number of tasks obtained from the parsing. Then, generate several threads according to the several tasks and solve them concurrently to obtain several solution data.
[0056] After receiving a task to be solved, the GPU first parses the task and divides it into several tasks based on the number of tasks. Then, it generates a corresponding number of solution threads for each task, allowing the GPU to perform concurrent solving on these threads to obtain several solutions. Compared to serial computation by the CPU, concurrent computation by the GPU reduces the time required for CFD calculations, thereby improving CFD solution efficiency. Simultaneously, since the entire concurrent computation process is executed by the GPU, it also improves the CPU's computational efficiency, ensuring its normal operation.
[0057] In this embodiment, by modifying the solve function in the chemistryModel.C file of OpenFOAM, the original CPU-based method of the system performing cyclic calculations on N solver tasks can be changed to sending N solver tasks to the GPU chip. The system then controls the GPU processing module to generate N corresponding solver threads based on the received N solver tasks and execute them concurrently. This accelerates the solver operation of the reactingFoam solver in OpenFOAM.
[0058] The modified solve function in the chemistryModel.C file in this embodiment is shown below:
[0059] 1) Determine whether further calculations are needed.
[0060] if! this->chemistry_
[0061] return GREAT;
[0062] 2) Perform host-to-device data transfer to transmit the data to the NVIDIA GPU.
[0063] 3) Create zip_iterator begin and end for later use.
[0064] begin=thrust::make_zip_iterator (
[0066] thrust::make_tuple (
[0068] thrust::counting_iterator <int>(0),
[0069] p.begin(),
[0070] T.begin(),
[0071] rho.begin(),
[0072] deltaTChem_.begin() ) );
[0075] end = begin + p.size();
[0076] 4) Add a lambda expression chemistryModelCalculateFunctor
[0077] struct chemistryModelCalculateFunctor
[0078] {
[0079] specieThermo_;
[0080] deltaTChem_;
[0081] deltaT;
[0082] RR_;
[0083] __host____device__
[0084] scalar operator()(const thrust::tuple<int,scalar,scalar,scalar,scalar>&tup)
[0085] { ...
[0087] scalar deltaTChem = thrust::get<4>(tup); ...
[0089] The ellipses above represent a series of calculations based on the values passed in
[0090] return deltaTChem;
[0091] }
[0092] };
[0093] e) Use `thrust::transform` to allocate threads to one or more grids on the GPU to achieve computation on the GPU (fully utilizing the kernel threads in the GPU).
[0094] thrust::tranform(begin,end,out.begin(),chemistryModelCalculateFunctor(specieTher mo_,del
[0095] taTChem_,deltaT,RR_)))
[0096] d) Obtain the minimum value of deltaTChem calculated in all grids.
[0097] deltaTMin=*thrust::min_element(out.begin,out.end());
[0098] The required input data for the modified solve function includes: rho, p, T, Y_, specieThermo_, deltaTChem_, deltaT, RR_;
[0099] The result obtained through the above calculation process is: deltaTMin.
[0100] For example, before the GPU processing module is controlled to parse the task to be solved, this embodiment further includes:
[0101] The number of threads is determined based on the amount of data to be solved, and the memory of the GPU processing module is adjusted according to the determined number of threads so that the adjusted free memory can meet the needs of the threads corresponding to the number of threads to perform concurrent solving calculations.
[0102] Simultaneously, based on the number of threads, the blank memory is divided into several thread memory areas corresponding to the number of threads, and several memory addresses corresponding to the several thread memory areas are determined.
[0103] Before the GPU receives and parses the task to be solved, the system will determine the number of threads to be prepared based on the number of tasks to be solved, and adjust the memory space in the GPU chip according to the determined number of threads. This will ensure that the free memory space in the chip is sufficient to receive the task to be solved, thereby improving the success rate of receiving the task to be solved and avoiding the failure of receiving the task to be solved due to insufficient free memory in the GPU chip, which would lead to errors in the system processing the data to be solved.
[0104] At the same time, the system will divide the adjusted blank memory into thread memory corresponding to the number of threads according to the determined number of threads, and then determine the memory address corresponding to the above multiple thread memory. This provides data support for the subsequent system to allocate the running address for solving several solving tasks, which facilitates the subsequent system to allocate solving tasks and improves the efficiency and accuracy of the system to allocate solving tasks.
[0105] Meanwhile, based on the advantages of the Thrust library, the system in this embodiment sends the corresponding memory address and solution instructions to each solver thread through Thrust::Transform, which facilitates subsequent parallel solving by each solver thread.
[0106] Furthermore, in this embodiment, the generation of several solution threads based on the several solution tasks and the concurrent solving of the several solution threads specifically involves:
[0107] The plurality of solving tasks are parsed and encoded to obtain the corresponding plurality of solving threads, and the solving instructions of the plurality of solving threads are determined.
[0108] The association between the plurality of solving threads and the plurality of memory addresses is determined, and the plurality of solving threads are allocated to the plurality of thread memory locations according to the memory addresses corresponding to the determined association, so that the plurality of thread memory locations receive the plurality of solving threads and perform concurrent solving according to the corresponding solving instructions.
[0109] When the GPU chip receives the task to be solved and divides it into several tasks, the system will parse these tasks and encode them one by one to obtain several solution threads that can be solved concurrently by the GPU chip. The system will also determine the solution instructions corresponding to each of these solution threads, so that the system can control each solution thread to perform concurrent solution calculations.
[0110] Upon receiving instructions, the system will determine the association between each solver thread and its memory address. Based on this association, the system will allocate the solver thread to the corresponding thread memory address, allowing the thread memory to receive the solver thread and perform concurrent solves according to its solver instructions. Since the solver described in this invention is a concurrent solver, the aforementioned solver threads will perform solves simultaneously. This multi-threaded concurrent solver technology using GPU improves the system's computational efficiency for CFD calculations.
[0111] In this embodiment, the system uses a server equipped with a CPU chip and a GPU chip. The CPU chip is of x86 architecture, and the GPU chip is manufactured by NVIDIA. Furthermore, this embodiment uses C++ and CUDA languages for coding. This embodiment uses CUDA for data transfer between the CPU chip and the GPU chip. After the data is transferred to the GPU chip, parallel computation is initiated via `thrust::transform`, and the computation results are subsequently transferred back to the CPU chip.
[0112] Furthermore, after obtaining several solution data points, this embodiment also includes:
[0113] Receive the plurality of solution data sent by the GPU processing module, and provide feedback on the data to be solved based on the plurality of solution data;
[0114] Simultaneously, a reset operation is performed on the memory space of the GPU processing module until the GPU processing module receives the task to be solved.
[0115] After completing the solution process and obtaining several solution data, the system will provide the user with the solution data corresponding to the input data to be solved, and reset the GPU chip in preparation for the next concurrent GPU solution calculation.
[0116] To better illustrate the working principle and steps of the solution acceleration method and apparatus based on GPU multithreaded concurrency technology of the present invention, please refer to the relevant description above, but not limited to.
[0117] Accordingly, see Figure 2 , Figure 2 This is a schematic diagram of an embodiment of the solution acceleration device based on GPU multi-threaded concurrency technology provided by the present invention. Figure 2 As shown, the solution acceleration device includes a task generation unit 201 and a task solving unit 202.
[0118] The task generation unit 201 is used to acquire and determine whether there are chemical terms in the data to be solved. If it is determined that there are chemical terms in the data to be solved, the number of tasks to be solved for the data to be solved is determined, and the data to be solved and the number of tasks to be solved are integrated to generate corresponding tasks to be solved and sent to the GPU processing module.
[0119] Furthermore, the task generation unit 201 determines the amount of solution task data of the data to be solved, specifically as follows:
[0120] The data to be solved is divided according to the number of grid tasks. Each grid task corresponds to one solution task. If the amount of data to be solved is less than one grid task, it is divided according to one grid task. This process continues until the data to be solved is divided. The number of grid tasks is then calculated, and the total number of grids obtained is taken as the number of solution tasks.
[0121] Furthermore, after obtaining several solution data, the task generation unit 201 further includes:
[0122] The system receives the plurality of solution data sent by the GPU processing module and provides feedback on the data to be solved based on the plurality of solution data; at the same time, it performs a reset operation on the memory space of the GPU processing module until the GPU processing module receives the task to be solved.
[0123] The task-solving unit 202 is used to control the GPU processing module to parse the task to be solved, and divide the data to be solved into several tasks according to the number of tasks obtained from the parsing. Then, it generates several threads according to the several tasks and performs concurrent solving on the several threads to obtain several solution data.
[0124] Furthermore, before the GPU processing module is controlled to parse the task to be solved, the task-solving unit 202 further includes:
[0125] The number of threads is determined based on the amount of data to be solved, and the memory of the GPU processing module is adjusted according to the determined number of threads so that the adjusted blank memory can meet the needs of the threads corresponding to the number of threads to perform concurrent solving calculations; at the same time, the blank memory is divided into several thread memory corresponding to the number of threads, and several memory addresses corresponding to the several thread memory are determined.
[0126] Furthermore, the task-solving unit 202 generates a number of corresponding solving threads based on the number of solving tasks and performs concurrent solving on the number of solving threads, specifically:
[0127] The process involves parsing and encoding the solution tasks to obtain corresponding solution threads, determining the solution instructions for each solution thread, establishing the association between the solution threads and memory addresses, and allocating the solution threads to the memory addresses based on the established association, so that several empty memory locations receive the solution threads and perform concurrent solutions according to the corresponding solution instructions.
[0128] In summary, this invention provides a solution acceleration method based on GPU multi-threaded concurrency technology. By determining whether chemical terms exist in the data to be solved, it determines whether the data and the number of solution tasks should be combined into a single task and sent to the GPU processing module for concurrent solving. The GPU processing module then parses and divides the received task into several solution threads, and performs concurrent solving on these threads. This invention reduces computation time and improves the computational efficiency of solving multiple solution tasks by having the GPU chip handle several solution tasks concurrently.
[0129] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.< / int>
Claims
1. A solution acceleration method based on GPU multi-threaded concurrency technology, characterized in that, Includes the following steps: The system acquires and determines whether the data to be solved contains chemical terms. If the data to be solved contains chemical terms, the system determines the number of solutions to the data to be solved and integrates the data to be solved and the number of solutions to generate corresponding solutions to be solved, which are then sent to the GPU processing module. The number of threads is determined based on the number of tasks to be solved, and the memory of the GPU processing module is adjusted according to the determined number of threads so that the adjusted free memory can meet the needs of the threads corresponding to the number of threads to perform concurrent solving calculations; at the same time, the free memory is divided into several thread memory corresponding to the number of threads, and several memory addresses corresponding to the several thread memory are determined. The GPU processing module is controlled to parse the task to be solved, and the data to be solved is divided into several tasks according to the number of tasks obtained from the parsing. Then, several threads are generated according to the several tasks and the several threads are solved concurrently. Specifically, the several tasks are parsed, the several tasks are encoded to obtain the corresponding several threads, and the solution instructions of the several threads are determined. The association between the plurality of solution threads and the plurality of memory addresses is determined, and the plurality of solution threads are allocated to the plurality of thread memory locations according to the memory addresses corresponding to the determined association, so that the plurality of thread memory locations receive the plurality of solution threads and perform concurrent solutions according to the corresponding solution instructions to obtain the plurality of solution data.
2. The solution acceleration method based on GPU multi-threaded concurrency technology as described in claim 1, characterized in that, The determination of the solution task data volume of the data to be solved specifically involves: The data to be solved is divided according to the number of grid tasks. Each grid task corresponds to one solution task. If the amount of data to be solved is less than one grid task, it is divided according to one grid task. This process continues until the data to be solved is divided. The number of grid tasks is calculated, and the total number of grids obtained is taken as the number of solution tasks.
3. The solution acceleration method based on GPU multi-threaded concurrency technology as described in claim 1, characterized in that, After obtaining the corresponding number of solution data, the process also includes: Receive the plurality of solution data sent by the GPU processing module, and provide feedback on the data to be solved based on the plurality of solution data; Simultaneously, a reset operation is performed on the memory space of the GPU processing module until the GPU processing module receives the task to be solved.
4. A solution acceleration device based on GPU multi-threaded concurrency technology, characterized in that, The solution acceleration device includes a task generation unit and a task solving unit; The task generation unit is used to acquire and determine whether there are chemical terms in the data to be solved. If it is determined that there are chemical terms in the data to be solved, the number of tasks to be solved for the data to be solved is determined, and the data to be solved and the number of tasks to be solved are integrated to generate corresponding tasks to be solved and sent to the GPU processing module. The task-solving unit is used to determine the number of threads based on the number of tasks to be solved, and adjust the memory of the GPU processing module according to the determined number of threads, so that the adjusted free memory can meet the concurrent solving calculations of the threads corresponding to the number of threads; at the same time, it divides the free memory into several thread memory corresponding to the number of threads, and determines several memory addresses corresponding to the several thread memory; it controls the GPU processing module to parse the tasks to be solved, and divides the data to be solved into several solving tasks according to the number of solving tasks obtained from the parsing, and then processes the data according to the several solving tasks. The process involves generating several solution threads and performing concurrent solutions on these threads. Specifically, this includes: parsing and encoding the solution tasks to obtain corresponding solution threads, and determining the solution instructions for each solution thread; determining the association between the solution threads and several memory addresses, and allocating the solution threads to the memory addresses corresponding to the determined associations, so that each memory address receives the solution threads and performs concurrent solutions according to the corresponding solution instructions to obtain corresponding solution data.
5. The solution acceleration device based on GPU multi-threaded concurrency technology as described in claim 4, characterized in that, The task generation unit determines the amount of solution task data for the data to be solved, specifically as follows: The data to be solved is divided according to the number of grid tasks. Each grid task corresponds to one solution task. If the amount of data to be solved is less than one grid task, it is divided according to one grid task. This process continues until the data to be solved is divided. The number of grid tasks is calculated, and the total number of grids obtained is taken as the number of solution tasks.
6. The solution acceleration device based on GPU multi-threaded concurrency technology as described in claim 4, characterized in that, After obtaining the corresponding number of solution data, the task generation unit further includes: Receive the plurality of solution data sent by the GPU processing module, and provide feedback on the data to be solved based on the plurality of solution data; Simultaneously, a reset operation is performed on the memory space of the GPU processing module until the GPU processing module receives the task to be solved.
Citation Information
Patent Citations
Streamline simulation acceleration method based on multi-node and multi-GPU computing
CN109857543A
Multithreaded rendering for virtualized graphics processing
US10649790B1