Multi-card parallel computing method and device

By grouping boards in multi-card parallel computing, data reading and calculation are performed in parallel, and the high bandwidth within the group is used to synchronize and push data, which solves the problem of low computing efficiency in the existing technology and improves computing efficiency and data transmission. speed.

CN118779281APending Publication Date: 2024-10-15SHANGHAI BIREN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411088558.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In multi-card parallel computing, the existing technology cannot parallelize intra-group communication and inter-group communication, resulting in low computing efficiency and long time consumption.

Method used

By grouping multiple boards and performing data reading and calculation in parallel between the same group and other groups, the high bandwidth of intra-group communication is used for data synchronization and push, which avoids waiting for communication between groups and improves computing efficiency.

Benefits of technology

It realizes the parallelization of intra-group communication and inter-group communication, improves the efficiency of multi-card parallel computing, reduces computing time, and improves data transmission speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779281A_ABST
    Figure CN118779281A_ABST
Patent Text Reader

Abstract

The invention provides a multi-card parallel computing method and device, and the method comprises the steps: grouping a plurality of board cards, and equally dividing the data on each board card into a plurality of parts; each board card reads a copy of data from each of other board cards in the same group and reads a copy of data from each of other board cards in other groups at the same time for calculation, and an initial calculation result of each board card is obtained; synchronizing the initial calculation result of any board card with the initial calculation result of at least one other board card, and then performing calculation to obtain a calculation result of any board card; and pushing the calculation result of any board card to at least one other board card. In the invention, the intra-group communication and the inter-group communication are parallel, so that the problem that the inter-group communication needs to wait for the intra-group communication to cause relatively long time consumption is avoided, and the calculation efficiency can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and in particular to a multi-card parallel computing method and device. Background Art

[0002] In the field of high-performance computing, operators usually refer to specific computing operations or functions, such as basic linear algebra subroutine operators (BLAS operators), fast Fourier transform operators (FFT operators), etc. In a multi-card (i.e., multiple boards) environment, especially when large-scale data and complex calculations are involved, it is crucial to give full play to the performance of operators on multiple cards. The performance of operators on multiple cards refers to the efficiency of operators when performing parallel calculations on multiple cards.

[0003] At present, when performing multi-card parallel computing, the data on the boards in the group are usually reduced first, then the data on all the boards are synchronized, the data on the boards between the groups are reduced, and finally the boards in the group are scattering so that all the boards in the group get the same computing results. However, this method has low computing efficiency. Summary of the invention

[0004] The present invention provides a multi-card parallel computing method and device, which are used to solve the defects existing in the related art.

[0005] The present invention provides a multi-card parallel computing method, comprising the following steps: Group multiple boards and divide the data on each board into multiple equal parts; Each board reads a piece of data from each other board in the same group, and simultaneously reads a piece of data from each board in other groups to perform calculations, thereby obtaining the initial calculation results of each board; Synchronizing an initial calculation result of any board with an initial calculation result of at least one other board to perform calculations to obtain the calculation result of any board; The calculation result of any one of the boards is pushed to the at least one other board.

[0006] According to a multi-card parallel computing method provided by the present invention, the at least one other card and any one of the cards are from the same group of cards.

[0007] According to a multi-card parallel computing method provided by the present invention, the step of pushing the computing result of any one of the boards to the at least one other board includes: The calculation result of any one of the boards is pushed to other boards in the same group.

[0008] According to a multi-card parallel computing method provided by the present invention, the bandwidth of the operator memory access path of the boards within a group is higher than the bandwidth of the operator memory access path of the boards between groups.

[0009] According to a multi-card parallel computing method provided by the present invention, the initial computing result of any board card is synchronized with the initial computing result of at least one other board card and then the computing result of any board card is obtained, including: The initial calculation result of any one of the boards is synchronized with the initial calculation result of at least one other board and then accumulated and calculated to obtain the calculation result of any one of the boards.

[0010] According to a multi-card parallel computing method provided by the present invention, the data on each board is obtained by dividing the operator input data according to the batch dimension.

[0011] The present invention also provides a multi-card parallel computing device, comprising the following modules: A division unit is used to group multiple boards and divide the data on each board into multiple equal parts; A reading unit, used for each board to read a piece of data from each other board in the same group, and simultaneously read a piece of data from each board in other groups for calculation, so as to obtain the initial calculation results of each board; A synchronization unit, used to synchronize the initial calculation result of any board with the initial calculation result of at least one other board and then perform calculation to obtain the calculation result of any board; The pushing unit is used to push the calculation result of any one of the boards to the at least one other board.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the multi-card parallel computing methods described above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the multi-card parallel computing method described above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the multi-card parallel computing method described above is implemented.

[0015] In the multi-card parallel computing method and device provided by the present invention, each board card reads a copy of data from each other board card in the same group and each board card reads a copy of data from each board card in other groups for computing simultaneously, that is, in the embodiment of the present invention, intra-group communication and inter-group communication are parallel, thus avoiding the problem of inter-group communication needing to wait for intra-group communication, which causes a long time consumption, thereby improving computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flowchart of a multi-card parallel computing method provided by related technology.

[0018] Figure 2 It is a flow chart of the multi-card parallel computing method provided by the present invention.

[0019] Figure 3 It is a flowchart diagram of another multi-card parallel computing method provided by the present invention.

[0020] Figure 4 It is a schematic diagram of the structure of the multi-card parallel computing device provided by the present invention.

[0021] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] In order to facilitate understanding of the technical solution of the present invention, the terms involved in the present invention are first explained as follows: Board: It can be understood as a hardware accelerator for parallel computing. The board can be an artificial intelligence chip. The artificial intelligence chip can include a graphics processing unit (GPU), a general-purpose graphics processing unit (GPGPU), a tensor processing unit (TPU), etc.

[0024] Reduce: It is a specification that is usually used to aggregate data distributed on multiple boards to generate a global summary result.

[0025] Scatter: that is, distribution, which distributes or disperses global data to each board.

[0026] PCIE: It is the abbreviation of Peripheral Component Interconnect Express, which is a high-speed serial bus standard used to connect expansion cards and motherboards.

[0027] P2P: It is the abbreviation of Peer-to-Peer, also known as P2Plink. In the field of computer communication, P2P usually refers to the communication method between direct devices.

[0028] Figure 1 It is a flowchart of a multi-card parallel computing method provided by related technology, such as Figure 1 As shown, the related technology uses 4 boards for parallel computing, and divides the 4 boards into two groups, group0 and group1, where board0 and board1 belong to group0, and board2 and board3 belong to group1. The operator memory access path between group0 and group1 is PCIE, the operator memory access path within group0 is P2P, and the operator memory access path within group1 is P2P. The performance of P2P is better than PCIE. The data on board0 is a, the data on board1 is b, the data on board2 is c, and the data on board3 is d. For the Add operator, when performing multi-card parallel computing, the data in the group is first reduced, that is, board 0 and board 1 in group0 are reduced based on P2P (b on board 1 is aggregated to board 0 through P2P, and the data on board a is aggregated to board 1 through P2P), and board 2 and board 3 in group1 are reduced based on P2P (c on board 2 is aggregated to board 3 through P2P, and d on board 3 is aggregated to board 2 through P2P). After the reduction, the data on board 0 is a+b, the data on board 1 is b+a, the data on board 2 is c+d, and the data on board 3 is d+c.

[0029] Next, boards 0 to 3 perform 4-card synchronization through PCIE, that is, c+d on board 2 is aggregated to board 0 through PCIE, and then board 0 obtains the full data a+b+c+d, and b+a on board 1 is aggregated to board 3 through PCIE, and then board 3 obtains the full data b+a+d+c.

[0030] Finally, scatter is performed in each group so that the four boards get the same calculation results. That is, scatter is performed between board 0 and board 1 in group 0, and scatter is performed between board 3 and board 2 in group 1. Finally, full data a+b+c+d is obtained on board 1 and board 2.

[0031] However, in the above-mentioned related technologies, before boards 0 to 3 perform 4-card synchronization (inter-group communication) through PCIE, they need to wait for the group to complete the protocol calculation through P2P (intra-group communication), that is, they need to wait for boards 0 and 1 to complete the protocol calculation, and boards 2 and 3 to complete the protocol calculation, which takes a long time and has low efficiency. In other words, in the above-mentioned related technologies, intra-group communication and inter-group communication cannot be carried out in parallel, which leads to low computing efficiency.

[0032] Figure 2 is a flow chart of the multi-card parallel computing method provided by the present invention, such as Figure 2 As shown, the method includes step 210 , step 220 , step 230 and step 240 .

[0033] Step 210: Group multiple boards and divide the data on each board into multiple equal parts.

[0034] Here, multiple boards can process different data at the same time, realize parallel computing of different data, and improve computing efficiency and speed. Among them, the board can be an artificial intelligence chip, and the artificial intelligence chip can include a graphics processing unit (GPU), a general-purpose graphics processing unit (GPGPU), a tensor processing unit (TPU), etc.

[0035] After acquiring multiple boards, the multiple boards are grouped, and each group includes at least 2 boards. For example, multiple boards can be grouped based on the cache size of each board so that the sum of the caches of all boards in each group is similar. In addition, the data on each board can be obtained by dividing the operator input data according to the batch dimension, that is, each board is responsible for processing part of the batch data. For example, if the operator input data includes 4 batches and 4 boards, the data on each board is 1 batch of operator input data.

[0036] Step 220: Each board reads a piece of data from each other board in the same group, and simultaneously reads a piece of data from each board in other groups to perform calculations, thereby obtaining initial calculation results of each board.

[0037] Specifically, each board reads a copy of data from each other board in the same group, which can be understood as each board needs to exchange data with other boards in the same group to ensure that each board can obtain a copy of data from other boards in the same group, that is, each board reads a copy of data from each other board in the same group to perform intra-group communication.

[0038] Each board reads a piece of data from each board in other groups for calculation, which can be understood as each board needs to exchange data with each board in other groups to ensure that each board can obtain a piece of data on each board in other groups. In other words, each board reads a piece of data from each board in other groups, which is inter-group communication.

[0039] In the embodiment of the present invention, each board reads a piece of data from each other board in the same group and each board reads a piece of data from each board in other groups for calculation at the same time, that is, in the embodiment of the present invention, intra-group communication and inter-group communication are parallel, thereby improving calculation efficiency.

[0040] After each board reads a copy of data from each other board in the same group, and simultaneously reads a copy of data from each board in other groups, each board has a copy of the data on all boards. By accumulating the copy of data on each board, the initial calculation result of each board can be obtained. The initial calculation result of each board can be understood as the accumulation result of the copy of data on all boards.

[0041] Step 230: Synchronize the initial calculation result of any board with the initial calculation result of at least one other board and perform calculation to obtain the calculation result of any board.

[0042] Specifically, since the initial calculation result of each board is the cumulative result of a portion of data on all boards, if the cumulative result of other portions of data on other boards is to be obtained, the initial calculation result of any board needs to be synchronized with the initial calculation result of at least one other board, so that any board can obtain the cumulative result of other portions of data on other boards. The number of the at least one other board is related to the number of portions of data on each board. For example, if the data on each board is divided into 2 portions, the initial calculation result of any board is synchronized with the initial calculation result of one other board; if the data on each board is divided into 3 portions, the initial calculation result of any board is synchronized with the initial calculation results of two other boards.

[0043] After synchronizing the initial calculation result of any board with the initial calculation result of at least one other board, the initial calculation result of any board can be accumulated with the initial calculation result of at least one other board to obtain the calculation result of any board. This calculation result can be understood as the accumulation result of the data on all boards, that is, the full amount of data.

[0044] Step 240: Push the calculation result of any board to at least one other board.

[0045] Specifically, the calculation result of any board is the full data. After obtaining the calculation result of any board, the calculation result of any board can be pushed to at least one other board (that is, any board is scatter with at least one other board), so that at least one other board can also obtain the full data.

[0046] In the multi-card parallel computing method provided by the embodiment of the present invention, each board reads a copy of data from each other board in the same group and each board reads a copy of data from each board in other groups for computing at the same time, that is, in the embodiment of the present invention, intra-group communication and inter-group communication are in parallel, thus avoiding the problem of inter-group communication needing to wait for intra-group communication, which causes a long time consumption, thereby improving computing efficiency.

[0047] As an optional embodiment, the data on each board is obtained after dividing the operator input data. The operator can be an operator in a neural network model. After performing multi-card parallel calculations using the above-mentioned embodiment method, the calculation results obtained can be applied to model reasoning to obtain model reasoning results.

[0048] Furthermore, the neural network model can be a text generation model, a text graph model, a computer vision model (such as an image classification model, a target detection model, a semantic segmentation model, etc.), etc. Taking the text generation model as an example, the operator input data can be determined based on the input text. After performing multi-card parallel calculation using the above embodiment method, the obtained calculation results can be applied to model reasoning to obtain the output text corresponding to the input text. Since the above method can improve the calculation efficiency, it can improve the reasoning speed of the model, and then improve the generation efficiency of the output text.

[0049] Based on the above embodiment, at least one other board and any board are boards of the same group.

[0050] Specifically, considering that the performance of intra-group communication is usually better than that of inter-group communication, such as the bandwidth of intra-group communication is usually higher than the bandwidth of inter-group communication, intra-group communication can transmit data faster. On this basis, if at least one other board is in the same group as any board, at least one board performs intra-group communication with any board, so that when synchronizing the initial calculation result of any board with the initial calculation result of at least one other board, the data transmission speed can be increased, and the calculation efficiency can be further improved.

[0051] Based on any of the above embodiments, the calculation result of any board is pushed to other boards, including: Push the calculation results of any board to other boards in the same group.

[0052] Specifically, since any board communicates with other boards in the same group, when the calculation result of any board is pushed to other boards in the same group, the data transmission speed can be increased, and the calculation efficiency can be further improved.

[0053] Based on any of the above embodiments, the bandwidth of the operator memory access path of the board cards within a group is higher than the bandwidth of the operator memory access path of the board cards between groups.

[0054] Specifically, the operator memory access path of the board card within the group can be understood as the path or path for accessing the board card during intra-group communication calculation, and the operator memory access path of the board card between groups can be understood as the path or path for accessing the board card during inter-group communication calculation.

[0055] The performance of the operator memory access path directly affects the computing efficiency. The higher the memory access path bandwidth, the faster the data transmission speed between boards. The operator memory access path bandwidth of the boards within a group is higher than the operator memory access path bandwidth of the boards between groups, indicating that the data transmission speed of the boards within a group is higher than the data transmission speed of the boards between groups.

[0056] For example, the operator memory access path of the board within the group can be P2P, and the operator memory access path of the board between groups can be PCIE. The bandwidth of P2P is higher than the bandwidth of PCIE, that is, the data transmission speed of P2P is higher than the data transmission speed of PCIE.

[0057] Based on any of the above embodiments, the initial calculation result of any board is synchronized with the initial calculation result of at least one other board and then calculated to obtain the calculation result of any board, including: The initial calculation result of any board is synchronized with the initial calculation result of at least one other board and then accumulated to obtain the calculation result of any board.

[0058] Specifically, since the initial calculation result of each board is the cumulative result of a copy of the data on all boards, if you want to obtain the cumulative results of other copies of data on other boards, it is necessary to synchronize the initial calculation result of any board with the initial calculation result of at least one other board, so that any board can obtain the cumulative results of other copies of data on other boards.

[0059] After obtaining the initial calculation results of at least one other board, the initial calculation results of any board are synchronized with the initial calculation results of at least one other board and then accumulated to obtain the calculation results of any board. This calculation result can be understood as the accumulation result of the data on all boards, that is, the full amount of data.

[0060] Based on any of the above embodiments, the data on each board is obtained by dividing the operator input data according to the batch dimension.

[0061] Specifically, the data on each board is obtained by dividing the operator input data according to the batch dimension, that is, each board is responsible for processing part of the batch data. For example, if the operator input data includes 4 batches and includes 4 boards, the data on each board can be 1 batch of operator input data. If the operator input data includes 8 batches and includes 4 boards, the data on each board can be 2 batches of operator input data.

[0062] Figure 3 FIG. 1 is a flow chart of another multi-card parallel computing method provided by the present invention, such as Figure 3 As shown in the figure, four boards are used for parallel computing, and the four boards are divided into two groups, group0 and group1. Board 0 and board 1 belong to group0, and board 2 and board 3 belong to group1. The operator memory access path between group0 and group1 is PCIE, the operator memory access path within group0 is P2P, and the operator memory access path within group1 is P2P. The performance of P2P is better than PCIE. The data on board 0 is a, the data on board 1 is b, the data on board 2 is c, and the data on board 3 is d.

[0063] The data on board 1, board 2, board 3 and board 4 are divided into 2 parts. Board 0 reads 1 part of data b / 2 on board 1 through P2P, and reads data c / 2 on board 2 and data d / 2 on board 3 through PCIE. Board 0 performs cumulative calculation on a / 2, b / 2, c / 2 and d / 2 to obtain the initial calculation result (a / 2+b / 2+c / 2+d / 2) of board 0. Referring to the way of obtaining the initial calculation result of board 0, the initial calculation result of board 1 is (b / 2+a / 2+c / 2+d / 2), the initial calculation result of board 2 is (c / 2+d / 2+a / 2+b / 2), and the initial calculation result of board 3 is (d / 2+c / 2+a / 2+b / 2).

[0064] Next, board 0 and board 1 are synchronized through P2P, that is, board 1 synchronizes the initial calculation result (a / 2+b / 2+c / 2+d / 2) to board 0, so that board 0 can perform cumulative calculations to obtain the calculation result of board 0 (a+b+c+d), and board 0 then pushes the calculation result (a+b+c+d) to board 1 through P2P. Similarly, board 2 and board 3 are synchronized through P2P, that is, board 3 synchronizes the initial calculation result (d / 2+c / 2+a / 2+b / 2) to board 2, so that board 2 can perform cumulative calculations to obtain the calculation result of board 2 (a+b+c+d), and board 2 then pushes the calculation result (a+b+c+d) to board 3 through P2P.

[0065] It can be seen that in the multi-card parallel calculation method provided by the embodiment of the present invention, in the process of determining the initial calculation results of each board, the intra-group communication (P2P communication) and the inter-group communication (PCIE communication) can be implemented in parallel to improve the calculation efficiency. In addition, after obtaining the calculation result of any board, it is synchronized to other boards in the same group through P2P, rather than through PCIE synchronization, thereby increasing the data transmission speed and further improving the calculation efficiency.

[0066] The multi-card parallel computing device provided by the present invention is described below. The multi-card parallel computing device described below and the multi-card parallel computing method described above can be referred to each other.

[0067] Based on any of the above embodiments, Figure 4 is a schematic diagram of the structure of the multi-card parallel computing device provided by the present invention, such as Figure 4 As shown, the device comprises: A division unit 410 is used to group multiple boards and divide the data on each board into multiple equal parts; The reading unit 420 is used for each board to read a piece of data from each other board in the same group, and simultaneously read a piece of data from each board in other groups for calculation, so as to obtain the initial calculation result of each board; A synchronization unit 430, used to synchronize the initial calculation result of any board with the initial calculation result of at least one other board and then perform calculation to obtain the calculation result of any board; The push unit 440 is used to push the calculation result of any board to at least one other board.

[0068] Based on any of the above embodiments, at least one other board and any board are boards of the same group.

[0069] Based on any of the above embodiments, pushing the calculation result of any board to at least one other board includes: Push the calculation results of any board to other boards in the same group.

[0070] Based on any of the above embodiments, the bandwidth of the operator memory access path of the board cards within a group is higher than the bandwidth of the operator memory access path of the board cards between groups.

[0071] Based on any of the above embodiments, the initial calculation result of any board is synchronized with the initial calculation result of at least one other board and then calculated to obtain the calculation result of any board, including: The initial calculation result of any board is synchronized with the initial calculation result of at least one other board and then accumulated to obtain the calculation result of any board.

[0072] Based on any of the above embodiments, the data on each board is obtained by dividing the operator input data according to the batch dimension.

[0073] Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute a multi-card parallel calculation method, which includes: grouping multiple boards and dividing the data on each board into multiple parts; each board reads a piece of data from each other board in the same group, and simultaneously reads a piece of data from each board in other groups to calculate, and obtains the initial calculation result of each board; synchronizes the initial calculation result of any board with the initial calculation result of at least one other board to calculate, and obtains the calculation result of any board; pushes the calculation result of any board to the at least one other board.

[0074] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0075] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multi-card parallel computing method provided by the above methods, which includes: grouping multiple board cards, and dividing the data on each board card into multiple equal parts; each board card reads a piece of data from each other board card in the same group, and simultaneously reads a piece of data from each board card in other groups for calculation, to obtain the initial calculation result of each board card; the initial calculation result of any board card is synchronized with the initial calculation result of at least one other board card and then calculated to obtain the calculation result of any board card; and the calculation result of any board card is pushed to the at least one other board card.

[0076] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the multi-card parallel computing method provided by the above-mentioned methods, the method comprising: grouping multiple board cards, and dividing the data on each board card into multiple equal parts; each board card reads a piece of data from each other board card in the same group, and simultaneously reads a piece of data from each board card in other groups for calculation, to obtain the initial calculation result of each board card; the initial calculation result of any board card is synchronized with the initial calculation result of at least one other board card and then calculated to obtain the calculation result of any board card; and the calculation result of any board card is pushed to the at least one other board card.

[0077] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-card parallel computing method, characterized in that: include: Group multiple boards and divide the data on each board into multiple equal parts; Each board reads a piece of data from each other board in the same group, and simultaneously reads a piece of data from each board in other groups to perform calculations, thereby obtaining the initial calculation results of each board; Synchronizing an initial calculation result of any board with an initial calculation result of at least one other board to perform calculations to obtain the calculation result of any board; The calculation result of any one of the boards is pushed to the at least one other board.

2. The multi-card parallel computing method according to claim 1, characterized in that: The at least one other board and any one of the boards are boards of the same group.

3. The multi-card parallel computing method according to claim 2, characterized in that: The step of pushing the calculation result of any one of the boards to the at least one other board comprises: The calculation result of any one of the boards is pushed to other boards in the same group.

4. The multi-card parallel computing method according to claim 2, characterized in that: The bandwidth of the operator memory access path of the boards within a group is higher than the bandwidth of the operator memory access path of the boards between groups.

5. The multi-card parallel computing method according to any one of claims 1 to 4, characterized in that: The step of synchronizing the initial calculation result of any board with the initial calculation result of at least one other board to obtain the calculation result of any board includes: The initial calculation result of any one of the boards is synchronized with the initial calculation result of at least one other board and then accumulated and calculated to obtain the calculation result of any one of the boards.

6. The multi-card parallel computing method according to any one of claims 1 to 4, characterized in that: The data on each board is obtained by dividing the operator input data according to the batch dimension.

7. A multi-card parallel computing device, characterized in that: include: A division unit is used to group multiple boards and divide the data on each board into multiple equal parts; A reading unit, used for each board to read a piece of data from each other board in the same group, and simultaneously read a piece of data from each board in other groups for calculation, so as to obtain the initial calculation results of each board; A synchronization unit, used to synchronize the initial calculation result of any board with the initial calculation result of at least one other board and then perform calculation to obtain the calculation result of any board; The pushing unit is used to push the calculation result of any one of the boards to the at least one other board.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the multi-card parallel computing method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-card parallel computing method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multi-card parallel computing method according to any one of claims 1 to 6 is implemented.