Distributed processing system and method
The interconnect technology optimizes the Ring-Allreduce algorithm by reordering data transfers and processing within and between blocks of processors, addressing communication bottlenecks and improving performance in data-parallel distributed deep learning systems.
Patent Information
- Application Number
- JP2022561749
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-11-11
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2040-11-11
AI Technical Summary
In data-parallel distributed deep learning, the communication bottleneck caused by Allreduce operations in heterogeneous computing systems, particularly due to unnecessary data transfers and processing delays, limits system scalability and performance.
An interconnect technology that optimizes the Ring-Allreduce algorithm by configuring a pipeline connection of communication interfaces in a specific order, reducing unnecessary data transfers and processing delays through forward and reverse data flow within and between blocks of processors.
This approach significantly reduces communication delays and improves the performance of Allreduce operations in heterogeneous computing systems, thereby enhancing system scalability and reducing power consumption and procurement costs.
Smart Images

Figure 0007552720000001 
Figure 0007552720000002 
Figure 0007552720000005
Abstract
Description
[Technical field]
[0001] The present invention relates to an interconnect technology for a distributed processing system used in data-parallel distributed deep learning. [Background technology]
[0002] Deep Neural Networks (DNNs) have been attracting increasing attention from both industry and academia, and have shown remarkable performance improvements by specializing in various domains, such as image recognition, speech recognition, natural language processing, etc. They are also used to imitate and simulate complex and large-scale physical phenomena, making a significant contribution to the scientific field. However, the larger and more complex the problem to be solved, or the more one tries to improve the accuracy of prediction and classification, the greater the amount of data and calculations required for DNN training, making a high-performance computing system necessary.
[0003] In order to meet the enormous amount of computation required, distributed deep learning connects multiple processors via a network, and each processor is responsible for sharing data and DNN models for learning. However, as with general parallel computing, it is known that communication between processors becomes a bottleneck, limiting the scalability of the system. In particular, in data-parallel distributed deep learning, collective communication called Allreduce (a collective communication algorithm) that shares and merges gradient information calculated by each processor is known to be a major bottleneck.
[0004] Therefore, several studies have been reported that attempt to improve scalability by optimizing update rules and communication algorithms.To fundamentally alleviate this bottleneck, heterogeneous computing interconnects consisting of a central processing unit (CPU) and multiple graphics processing units (GPUs) used to process distributed deep learning have attracted attention.
[0005] In recent years, heterogeneous computing interconnects have adopted GPUDirect RDMA or RoCE (RDMA over Converged Ethernet), which bypass the CPU and store data directly from the network to the GPU's device memory in order to achieve high performance. This type of configuration is known to be able to move data with extremely low latency, but there is a problem in that when data movement is linked to some kind of processing, the latency required for the processing becomes the main latency.
[0006] Torsten et al. point out that the L2 cache latency of RDMA to CPU memory is slower than the latency of Ethernet (registered trademark) at 100 Gbps or more. Similarly, Zhe et al.'s research shows that the GPUL2 cache latency (for example, the L2 cache latency of the V100 is 193 cycles, and the cache latency of the P100 is 234 cycles) is also about 20 times slower than the throughput of 100 Gbps Ethernet. In other words, it is thought that the communication overhead when data movement and processing are linked, rather than the delay in the data movement itself, is what reduces the performance of Allreduce.
[0007] In distributed deep learning, for example, after finding the gradient of the loss function for the model parameters using different data, the gradients are averaged across processors, and the average is considered to be the obtained gradient and applied to the model. To find the average gradient, the array data held by each processor is aggregated (reduced) using a convolution calculation process or similar, and the aggregated results are then distributed equally to all processors, i.e., Allreduce is required.
[0008] In Allreduce, in order to distribute processing so as not to cause imbalance in the amount of processing among processors, a distributed processing algorithm such as the Ring-Allreduce algorithm is used, which employs a ring topology in which each processor is connected in a ring shape via a communication ring. Conventionally, in order to speed up distributed processing using such a Ring-Allreduce algorithm, the inventors have proposed an interconnect technology of a NIC offloading type (for example, see Non-Patent Document 1).
[0009] This interconnect technology is configured to offload the aggregation processing and data distribution processing in the Ring-Allreduce algorithm to the communication interface NIC (Network Interface Card) of each processor. This makes it possible to pipeline the aggregation processing and data distribution processing, and significantly reduce processing delays caused by communication overhead. [Prior art documents] [Non-patent literature]
[0010] [Non-Patent Document 1] Kenji Tanaka, Yuki Arikawa, Tsuyoshi Ito, Kazutaka Morita, Naru Nemoto, Fumiaki Miura, Kazuhiko Terada, Junji Teramoto and Takeshi Sakamoto, "Communication-Efficient Distributed Deep Learning with GPU-FPGA Heterogeneous Computing", 2020 IEEE Symposium on High-Performance Interconnects (HOTI 2020), 19-21 Aug. 2020 Summary of the Invention [Problem to be solved by the invention]
[0011] According to the above-mentioned conventional technology (Non-Patent Document 1), when distributing the aggregated result to each processor, the aggregated result is transferred from the last NIC of the last processor that is located at the end of the processing order among the processors involved in the aggregation operation processing of the aggregated result to the first NIC of the processor that is located at the beginning of the processing order, and distribution of the aggregated result is started from the first NIC according to the processing completion judgment of the first NIC. Therefore, data transfer that is not directly related to the aggregation operation processing or distribution processing occurs, which causes a problem of unnecessary processing delay.
[0012] The present invention is made to solve such problems, and aims to provide an interconnect technology that can further improve the delay performance of Allreduce in a heterogeneous computing interconnect. [Means for solving the problem]
[0014] Another distributed processing system according to the present invention comprises a plurality of processors performing arithmetic processing, and a plurality of communication interfaces provided corresponding to each of the plurality of processors and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, the plurality of communication interfaces performing aggregation processing on first array data held in a distributed manner by each of the plurality of processors based on a Ring-Allreduce algorithm, and distributing the obtained aggregation results to each of the processors, the distributed processing system comprising a plurality of blocks each consisting of the plurality of processors and the plurality of communication interfaces, the communication interfaces belonging to each of the blocks being arranged in a forward order consisting of a head communication interface located at the head of the first pipeline connection of the block, an intermediate communication interface located in the middle, and a tail communication interface located at the tail, an aggregation result is generated by aggregating data belonging to the first array data output from each processor, the tail communication interface belonging to each of the blocks forms a second pipeline connection by connecting the blocks via a second communication line, further aggregates the aggregation result obtained in each of the blocks by the second pipeline connection, and distributes the obtained aggregation result between the blocks to each other by the second pipeline connection, and the communication interface belonging to each of the blocks, when the aggregation result between the blocks is obtained by the second pipeline connection, starts distributing the aggregation result between the blocks, distributes the aggregation result between the blocks in the reverse order of the tail communication interface, the intermediate communication interface, and the head communication interface, and outputs the aggregation result between the blocks to its own processor.
[0015] The system further includes a plurality of processors for performing arithmetic processing, and a plurality of communication interfaces provided corresponding to the plurality of processors, and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, and the plurality of communication interfaces are connected to the first pipeline connection by the first communication line held by each of the plurality of processors in a distributed manner. Sequence dataand second array data based on a Ring-Allreduce algorithm and distribute the obtained aggregation result to each of the processors, the system comprising a plurality of blocks each consisting of the plurality of processors and the plurality of communication interfaces, the communication interface belonging to each of the blocks generates a first aggregation result by performing an aggregation operation on data belonging to the first array data output from each of the processors in a forward order consisting of a head communication interface located at the head of the first pipeline connection of the block, an intermediate communication interface located in the middle, and a tail communication interface located at the tail, and the communication interface belonging to each of the blocks generates a second aggregation result by performing an aggregation operation on data belonging to the second array data output from each of the processors in a reverse order consisting of the tail communication interface, the intermediate communication interface, and the head communication interface, and the tail communication interface belonging to each of the blocks connects the blocks via a second communication line. a second pipeline connection is formed by further aggregating the first aggregation results obtained in each of the blocks by the second pipeline connection, and the obtained aggregation results between the first blocks are mutually distributed by the second pipeline connection; the head communication interfaces belonging to each of the blocks form a third pipeline connection by connecting the blocks via a third communication line, and further aggregating the second aggregation results obtained in each of the blocks by the third pipeline connection, and the obtained aggregation results between the second blocks are mutually distributed by the third pipeline connection; the communication interfaces belonging to each of the blocks distribute the aggregation results between the first blocks obtained by the second pipeline connection in a reverse order of the tail communication interface, the intermediate communication interface, and the head communication interface, and distribute the aggregation results between the second blocks obtained by the third pipeline connection in a forward order of the head communication interface, the intermediate communication interface, and the tail communication interface;The processor is configured to output the aggregation result between the first and second blocks to its own processor.
[0017] Further, another distributed processing method according to the present invention is a distributed processing method used in a distributed processing system including a plurality of blocks each including a plurality of processors performing arithmetic processing and a plurality of communication interfaces provided corresponding to each of the plurality of processors and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, the plurality of communication interfaces performing an aggregation operation on first array data distributed and held by each of the plurality of processors based on a Ring-Allreduce algorithm and distributing the obtained aggregation result to each of the processors, the communication interfaces belonging to each of the blocks being arranged in a forward order consisting of a head communication interface located at the head of the first pipeline connection of the block, an intermediate communication interface located in the middle, and a tail communication interface located at the tail. The method includes a first step of generating an aggregation result by performing an aggregation operation on data belonging to column data; a second step of the tail communication interfaces belonging to each of the blocks forming a second pipeline connection by connecting the blocks via a second communication line, further aggregating the aggregation results obtained in each of the blocks by the second pipeline connection, and distributing the obtained aggregation results between the blocks to each other by the second pipeline connection; and a third step of the tail communication interfaces belonging to each of the blocks starting distribution of the aggregation result between the blocks when the aggregation result between the blocks is obtained by the second pipeline connection, distributing the aggregation result between the blocks in the reverse order of the tail communication interface, the intermediate communication interface, and the head communication interface, and outputting the aggregation result between the blocks to its own processor.
[0018] Further, another distributed processing method according to the present invention includes a plurality of blocks each including a plurality of processors performing arithmetic processing and a plurality of communication interfaces provided corresponding to each of the plurality of processors and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, the plurality of communication interfaces being provided corresponding to each of the plurality of processors performing arithmetic processing and constituting a first pipeline connection, Sequence dataand second array data based on a Ring-Allreduce algorithm, and distributes the obtained aggregation result to each of the processors, the system comprising: a first step of generating a first aggregation result by aggregating data belonging to the first array data output from each processor in a forward order of the communication interfaces belonging to each of the blocks, the first communication interface being located at the head of the first pipeline connection of the block, an intermediate communication interface being located in the middle, and a tail communication interface being located at the tail; a second step of generating a second aggregation result by aggregating data belonging to the second array data output from each processor in a reverse order of the communication interfaces belonging to each of the blocks, the tail communication interface, the intermediate communication interface, and the first communication interface; and a second pipeline connection is formed by connecting the blocks via a second communication line, and the second pipeline connection is distributed to each of the processors. a third step of aggregating the first aggregation results obtained in each of the blocks through a pipeline connection and distributing the obtained aggregation results between the first blocks among the blocks through the second pipeline connection; a fourth step of the head communication interface belonging to each of the blocks configuring a third pipeline connection by connecting the blocks through a third communication line, further aggregating the second aggregation results obtained in each of the blocks through the third pipeline connection and distributing the obtained aggregation results between the second blocks among the blocks through the third pipeline connection; a fifth step of the communication interface belonging to each of the blocks distributing the aggregation results between the first blocks among the blocks obtained through the second pipeline connection in a reverse order of the tail communication interface, the middle communication interface, and the head communication interface, and outputting the aggregation results between the first blocks to its own processor;and a sixth step of distributing the packets in the order of the head communication interface, the middle communication interface, and the tail communication interface, and outputting the aggregation result between the second blocks to its own processor. Effect of the Invention
[0019] According to the present invention, it is possible to further improve the delay performance of Allreduce in an interconnect for heterogeneous computing. [Brief description of the drawings]
[0020] [Figure 1] FIG. 1 is a block diagram showing the configuration and operation of a distributed processing system according to the first embodiment. [Diagram 2] FIG. 2 is a block diagram showing the configuration and operation of a conventional distributed processing system (NIC offloading system). [Diagram 3] FIG. 3 is a flow diagram showing the operation of the distributed processing method according to the first embodiment. [Figure 4] FIG. 4 is a block diagram illustrating a configuration and an operation of a distributed processing system according to the second embodiment. [Diagram 5] FIG. 5 is a block diagram illustrating the configuration and operation (continuation) of the distributed processing system according to the second embodiment. [Figure 6] FIG. 6 is a flow diagram showing the operation of the distributed processing method according to the second embodiment. [Figure 7] FIG. 7 is a block diagram illustrating a configuration and an operation of a distributed processing system according to the third embodiment. [Figure 8] FIG. 8 is a block diagram illustrating the configuration and operation (continuation) of the distributed processing system according to the third embodiment. [Figure 9] FIG. 9 is a flow diagram showing the operation of the distributed processing method according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0021] Next, an embodiment of the present invention will be described with reference to the drawings. [First embodiment] First, a distributed processing system 10 according to a first embodiment of the present invention will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the configuration and operation of the distributed processing system according to the first embodiment. This distributed processing system 10 is a heterogeneous computing system used in data-parallel distributed deep learning and consisting of a CPU (Central Processing Unit) and multiple GPUs (Graphics Processing Units) used to process the distributed deep learning.
[0022] [Principle of the present invention] In distributed deep learning, for example, after finding the gradient of the loss function for the model parameters using different data, the gradients are averaged across processors, and the average is considered to be the obtained gradient and applied to the model. To find the average gradient, the array data held by each processor is aggregated (reduced) using a convolution calculation process or similar, and the aggregated results are then distributed equally to all processors, i.e., Allreduce is required.
[0023] In Allreduce, in order to distribute processing so as not to cause an imbalance in the amount of processing among processors, a distributed processing algorithm such as the Ring-Allreduce algorithm is used, which employs a ring topology in which each processor is connected in a ring shape via a communication ring. Conventionally, in order to speed up distributed processing using such a Ring-Allreduce algorithm, the inventors have proposed the above-mentioned NIC offloading type interconnect technology (for example, see Non-Patent Document 1). First, this conventional technology will be described.
[0024] For example, in the Ring-Allreduce algorithm, M (M is an integer equal to or greater than 2) processors each hold M individual pieces of data, and each processor selects its own data one by one, sequentially adds (reduces) it to the data received from the previous processor, and transmits the resulting addition result to the next processor. As a result, each processor adds its own data one by one to the addition result circulating on the communication ring, and when the addition result has made one trip around all the processors along the communication ring, each processor will have obtained one of M types of addition results.
[0025] If these addition results are sent around the communication ring once more, all processors will eventually share all M types of addition results. This means that the amount of calculations per processor and the amount of data sent and received between processors can be distributed more efficiently than if, for example, one processor were to perform all the addition processes. In the conventional technology described above, the aggregation processing and data distribution processing in the Ring-Allreduce algorithm are configured to be offloaded to the NIC (network interface card) of each processor. This makes it possible to pipeline the aggregation processing and data distribution processing, and significantly reduce processing delays caused by communication overhead.
[0026] 2 is a block diagram showing the configuration and operation of a conventional distributed processing system (NIC offloading method). Here, as an example of a distributed processing system 50, three processors P#1, P#2, and P#3 are connected by corresponding communication interfaces NIC#1, #2, and #3 to configure a first pipeline connection PL1. In the following, the communication interface NIC is simply referred to as NIC.
[0027] 2, data X1 output from processor P#1 is transmitted from NIC#1 to the next NIC#2. Data X1 is received by NIC#2 and added to data X2 output from processor P#2, and the obtained intermediate result (X1+X2) is transmitted from NIC#2 to the next NIC#3. The intermediate result is received by NIC#3 and added to data X3 output from processor P#3, and the obtained addition result XS (=X1+X2+X3), i.e., the aggregated result, is transferred from NIC#3 to the original NIC#1.
[0028] The sum XS of the data X1, X2, and X3 obtained in this way is received by NIC#1 of processor P#1. Here, NIC#1 determines that the aggregation process is complete because the sum XS has circulated up to the top NIC#1 of processor P#1, which is the top processor in the processing order among the processors P#1, #2, and #3 involved in the aggregation process of the sum XS, and starts distribution processing of the received sum XS.
[0029] In this distribution process, first, the addition result XS is returned from NIC#1 to NIC#3. As a result, the addition result XS is received by NIC#3 and output to processor P#3, and also distributed to NIC#2. Similarly, the addition result XS is received by NIC#2 and output to processor P#2, and also distributed to NIC#1. Finally, the addition result XS is received by NIC#1 and output to processor P#1. As a result, the addition result XS of data X1, X2, and X3 is distributed and shared by all processors P#1, #2, and #3.
[0030] In the case of a ring topology, adjacent NICs are connected with a communication ring, so two communication ports (communication channels) are provided on each NIC, and six (=2 x 3) communication ports are required for the entire system. When three processors are used as shown in Figure 2, data goes around each NIC in a ring shape in both the aggregation phase, during which the aggregation processing started on the top NIC#1 is judged to be completed on the top NIC#1, and the distribution phase, during which the distribution processing started on the top NIC#1 is completed on the top NIC#1. For this reason, if the delay time per communication port is L, when the data goes around each NIC in a ring shape, there will be a delay of 6L in both the aggregation phase and distribution phase. Therefore, if the number of processors is n (n is an integer equal to or greater than 2), a delay of 2nL will occur.
[0031] Here, if we focus on the time when distribution of the sum result XS begins, in the example of Figure 2, among the processors P#1, #2, and #3 involved in the aggregation processing of the sum result XS, only the sum result XS is exchanged between NIC#3 located at the end of the first pipeline connection PL1 and NIC#1 located at the beginning, and data transfer is occurring that is not directly related to the aggregation processing or distribution processing.
[0032] The present invention focuses on such unnecessary data transfer of the sum result XS, and when the sum result XS is obtained at the end NIC #3, the sum result XS is not transferred to the head NIC #1, and distribution processing of the sum result XS is immediately started. This makes it possible to eliminate data transfer between the end NIC #3 and the head NIC #1, and as a result, it becomes possible to reduce the delay time that occurs due to passing through a communication port in both the aggregation phase and the distribution phase.
[0033] Therefore, when three processors are used as shown in Figure 2, the data needs to go through 4 (=2 × (3-1)) communication ports in each of the aggregation and distribution phases. Therefore, if the delay time per communication port is L, then there will be a delay of 4L in each of the aggregation and distribution phases. Therefore, if the number of processors is n, it is possible to reduce the delay time to 2(n-1)L.
[0034] [Distributed Processing System] Next, the configuration of the distributed processing system 10 according to the present embodiment will be described in detail with reference to FIG. 1, a distributed processing system 10 includes a plurality of processors P that perform arithmetic processing, and a plurality of communication interface cards (NICs) that correspond to the respective processors P and form a first pipeline connection PL1 by connecting the processors in series via a first communication line L1. The pair of processor P and communication interface card NIC may be regarded as an integrated device and called a node.
[0035] [Processor] The processor P is a general arithmetic processing device used for processing distributed deep learning. The above-mentioned data storage technologies such as GPUDirect RDMA or RoCE (RDMA over Converged Ethernet) are applied to a configuration using a GPU (Graphics Processing Unit) as the processor P. Before starting the aggregation processing and distribution processing, the processor P holds data obtained by processing data stored in advance by the communication interface NIC in each processor P. These data are data (element data) belonging to a series of array data consisting of one-dimensional arrays, and are distributed and held in each processor P.
[0036] [Communication interface] The communication interfaces NIC (#1, #2, #3) each include, as main circuit components, two communication ports (communication channels) PTA, PTB, and a control circuit CNT. [Communication port] The communication ports PTA and PTB are configured to transmit and receive data and aggregation results to and from the adjacent communication interface NIC via the first communication line L1.
[0037] [Control circuit] During aggregation processing, the control circuits CNT (#1, #2, #3) are configured to perform aggregation processing on data output from each processor P in the forward order of the head communication interface located at the head of the first pipeline connection PL1, the middle communication interface located in the middle, and the head communication interface located at the end. In addition, during distribution processing, when the aggregation operation at the end communication interface is completed, the control circuit CNT is configured to start distributing the obtained aggregation result, distribute the aggregation result in the reverse order of the end communication interface, the intermediate communication interface, and the start communication interface, and output the aggregation result to its own processor.
[0038] The processing contents of the control circuit CNT differ depending on where its own communication interface NIC is located in the first pipeline connection PL1. Note that, hereinafter, based on the forward order (processing order of the aggregate operation processing) of the first pipeline connection PL1, the communication interface NIC adjacent to the head side of any communication interface NIC is called the previous stage communication interface NIC, and the communication interface NIC adjacent to the tail side of any communication interface NIC is called the next stage communication interface NIC.
[0039] When its own communication interface NIC is the head communication interface, the control circuit CNT transmits data output from its own processor P to the next stage communication interface NIC. In addition, when the control circuit CNT's own communication interface NIC is an intermediate communication interface, it performs an aggregation operation on the data received from the previous stage communication interface NIC and the data output from its own processor P, and transmits the intermediate result obtained to the next stage communication interface NIC.
[0040] In addition, when the control circuit CNT's own communication interface NIC is a tail communication interface, it performs an aggregation operation on the data (intermediate result) received from the previous stage communication interface NIC and the data output from its own processor P, and starts a distribution process of the obtained aggregation result upon completion of the aggregation operation. The position of each communication interface NIC in the first pipeline connection PL1 may be set in hardware in each control circuit CNT when the distributed processing system 10 is constructed, or may be set in software in each control circuit CNT when data is stored in each processor P.
[0041] [Operation of the first embodiment] Next, the operation of the distributed processing system 10 and the distributed processing method according to the present embodiment will be described with reference to Fig. 1 and Fig. 3. Here, the case where an addition process is performed as the aggregation operation will be described. It is assumed that each of the processors P1, P2, and P3 holds three items of X1, X2, and X3 in a distributed manner as one-dimensional array data to be subjected to the aggregation operation. It is also assumed that the communication interfaces NIC#1, #2, and #3 are the head, middle, and tail communication interface NICs, respectively. In the following, the communication interface NIC will be simply referred to as NIC.
[0042] In this embodiment, as shown in Fig. 1, the case where the number n of processors P and communication interface NICs is n=3 will be described as an example, but the present invention is not limited to this, and the present embodiment can be applied in the same manner as described below even when n=2 or n≧4. In particular, when n=2, the intermediate communication interface NIC is omitted. Also, when n≧4, n-2 intermediate communication interface NICs are connected.
[0043] [Aggregation Phase] (First step S1-1) First, in the aggregation phase, the head NIC#1 transmits data X1 output from its own processor P#1 to the next-stage middle NIC#2 from the communication port PTB. The middle NIC#2 adds the data X1 from the head NIC#1 received at the communication port PTA to the data X2 output from its own processor P#2, and transmits the obtained intermediate result (=X1+X2) from the communication port PTB to the next-stage tail NIC#3. The tail NIC#3 adds the intermediate result from the head NIC#1 received at the communication port PTA to the data X3 output from its own processor P#3, and generates the addition result XS (=X1+X2+X3) of the entire first pipeline connection PL1.
[0044] [Distribution Phase] (Second Step S1-2) Next, when the sum XS is generated in the end NIC #3, the aggregation phase is completed and the distribution phase is started. First, the end NIC #3 transmits the sum XS it generated from its own communication port PTA to the middle NIC #2 in the previous stage, and outputs the sum XS to its own processor P3. The middle NIC #2 transmits the sum XS received from the end NIC #3 at its communication port PTB from its communication port PTA to the top NIC #1 in the previous stage, and outputs the sum XS to its own processor P2. The top NIC #1 outputs the sum XS received from the middle NIC #2 at its communication port PTB to its own processor P1. As a result, the sum XS obtained by the aggregation operation process is distributed to and shared by each of the processors P1, P2, and P3.
[0045] According to this embodiment, compared to the conventional configuration shown in Fig. 2, in both the aggregation phase and distribution phase, data does not pass through port PTB of the tail NIC #3 and port PTA of the head NIC #1, and the number of communication ports through which data passes can be reduced. As a result, if the number of processors is n (n is an integer equal to or greater than 2), the number of communication ports in the entire distributed processing system 10 is 2(n-1), and if the delay time per communication port is L, the delay that occurs is time 2(n-1)L. Therefore, the delay time is reduced by time 2L compared to the delay time 2n in the conventional configuration.
[0046] [Advantages of the first embodiment] Thus, according to this embodiment, compared to the conventional configuration shown in Fig. 2, the number of communication ports through which data is transferred can be reduced in each of the aggregation phase and distribution phase, and as a result, the delay time can be reduced. Therefore, it is possible to further improve the delay performance of Allreduce in the interconnect of heterogeneous computing. In addition, since the number of ports used is reduced, it is possible to reduce power consumption, procurement costs, and failure response.
[0047] [Second embodiment] Next, a distributed processing system 10 according to a second embodiment of the present invention will be described with reference to Fig. 4 and Fig. 5. Fig. 4 is a block diagram showing the configuration and operation of the distributed processing system according to the second embodiment. Fig. 5 is a block diagram showing the configuration and operation (continuation) of the distributed processing system according to the second embodiment.
[0048] As shown in FIGS. 4 and 5, a distributed processing system 10 according to this embodiment includes m (m is an integer of 2 or more) blocks B, each block B including n (n is an integer of 2 or more) processors P and a communication interface NIC. In this embodiment, as shown in Figures 4 and 5, the cases where n=3 and m=3 will be described as examples, but the present invention is not limited thereto, and the present embodiment can be applied in the same manner as described below even when n=2 or n≧4, or when m=2 or m≧4. In particular, when n=2, the configuration is one in which the intermediate NIC is omitted, and when n≧4, the configuration is one in which n-2 intermediate NICs are connected. In addition, when m=2, the configuration is one in which the intermediate block m is omitted, and when m≧4, the configuration is one in which m-2 intermediate blocks m are connected.
[0049] The array data to be aggregated (first array data) is divided, and the multiple array data obtained are aggregated in each block. The aggregated results obtained are then further aggregated between blocks, thereby obtaining an aggregated result for the entire array data. In this embodiment, a second pipeline connection PL2 is formed by connecting the blocks via a second communication line L2 using the tail NIC #3 of each block B#1, #2, #3, and the aggregation results obtained in each of the blocks B#1, #2, #3 are further aggregated by the second pipeline connection PL2, and the obtained inter-block aggregation results are mutually distributed by the second pipeline connection PL2.
[0050] In addition, when an inter-block aggregation result is obtained by the second pipeline connection PL2, the NICs #1, #2, and #3 of each block B#1, #2, and #3 are configured to start distributing the inter-block aggregation result in the first pipeline PL1 within each block B#1, #2, and #3, distribute the inter-block aggregation result in the order of the last NIC #3, the middle NIC #2, and the first NIC #1, and output the inter-block aggregation result to their own processors P#1, P#2, and P#3.
[0051] [Operation of the second embodiment] Next, the operation of the distributed processing system 10 and the distributed processing method according to the present embodiment will be described with reference to Figures 4, 5, and 6. Here, a case where an addition process is performed as an aggregation operation will be described. It is assumed that the array data obtained by dividing the original array data into three (m=3) pieces of data X1, X2, and X3 to be aggregated are distributed and held in each of the processors P1, P2, and P3 of each of the blocks B#1, B#2, and B#3.
[0052] [Intra-block aggregation phase] (first step S2-1) In the intra-block aggregation phase, an aggregation operation process is executed for each block B#1, #2, #3 to aggregate data X1, X2, X3 held by processors P1, P2, P3 in the block i (i=1, 2, 3). At this time, the intra-block aggregation phase is executed in parallel in the first pipeline connection PL1 in each block B#1, #2, #3.
[0053] As shown in FIG. 4, first, in each block B#i, NIC#1 located at the head of the first pipeline connection PL1 transmits data X1 output from its own processor P#1 to the next stage NIC#2 from the communication port PTB. NIC#2 adds data X1 from NIC#1 received at the communication port PTA to data X2 output from its own processor P#2, and transmits the obtained intermediate result (=X1+X2) from the communication port PTB to the next stage NIC#3. NIC#3 located at the end of the first pipeline connection PL1 adds intermediate result XP2 from NIC#2 received at the communication port PTA to data X3 output from its own processor P#3, and generates the sum result XSi (=X1+X2+X3) of the entire block B#i. This completes the intra-block aggregation phase.
[0054] [Inter-block aggregation / distribution phase] (Second step S2-2) After the intra-block aggregation phase is completed, an inter-block aggregation phase is executed to aggregate the sum results XSi generated in each block B#1, #2, #3. At this time, the inter-block aggregation phase is executed in the same manner as the intra-block aggregation phase in the second pipeline connection PL2 consisting of the tail NIC#3 of each block B#1, #2, #3.
[0055] As shown in FIG. 4, first, the NIC#3 of the block B#1 located at the head of the second pipeline connection PL2 transmits the self-generated addition result XS1 of the block B#1 from the communication port PTB to the NIC#3 of the block B#2 at the next stage. The NIC#3 of the block B#2 adds the self-generated addition result XS2 of the block B#2 to the NIC#3 of the block B#1 received at the communication port PTB, and transmits the obtained intermediate result (=XS1+XS2) from the communication port PTB to the NIC#3 of the block B#3 at the next stage. The NIC#3 of the block B#3 located at the end of the second pipeline connection PL2 adds the self-generated addition result XS3 of the block B#1 to generate the block addition result XB (=XS1+XS2+XS3) of the entire blocks B#1, #2, #3. This completes the inter-block aggregation phase.
[0056] After the inter-block aggregation phase is completed, an inter-block distribution phase is executed to distribute the block addition results XB of the entire blocks B#1, #2, #3 to the blocks B#1, #2, #3. At this time, the inter-block distribution phase is executed in the order of blocks B#3, #1, #2 in the second pipeline connection PL2.
[0057] As shown in Figure 5, first, NIC#3 of block B#3 located at the end of the second pipeline connection PL2 transmits the block addition result XB that it generates itself from the communication port PTB to NIC#3 of the preceding block B#1. NIC#3 of block B#1 transmits the block addition result XB received from NIC#3 of block B#3 at the communication port PTB to NIC#3 of the preceding block B#2 at the communication port PTB. NIC#3 of block B#2 receives the block addition result XB from NIC#3 of block B#1 at the communication port PTB. This completes the inter-block distribution phase.
[0058] [Intra-block distribution phase] (third step S2-3) After the inter-block distribution phase is completed, the inter-block distribution phase is executed to distribute the block addition result XB within each block B#1, #2, #3. At this time, the intra-block distribution phase is executed in parallel in the first pipeline connection PL1 of each block B#1, #2, #3 in the reverse order to the normal order of the intra-block aggregation phase.
[0059] As shown in FIG. 5, first, in each block B#i, NIC#3 located at the end of the first pipeline connection PL1 transmits the block addition result XB distributed in the second pipeline connection PL2 from the communication port PTA to the preceding NIC#2 and outputs it to its own processor P#3. NIC#2 transmits the block addition result XB received from NIC#3 at the communication port PTB from the communication port PTA to the preceding NIC#1 and outputs it to its own processor P#2. NIC#1 located at the head of the first pipeline connection PL1 outputs the block addition result XB received from NIC#2 at the communication port PTB to its own processor P#1. This completes the intra-block distribution phase.
[0060] In general, when the number of processors is n×m, the number of communication ports in the entire distributed processing system 10 is 2 nm, and therefore, when the delay time per communication port is L, a delay of 2 nm occurs. According to this embodiment, the number of communication ports in the entire distributed processing system 10 is 2(n-1)(m-1), and therefore, when the delay time per communication port is L, the delay that occurs is 2(n-1+m-1)L. Therefore, the delay time is reduced by 2(nm-n-m+2)L from the delay time of 2 nm in the conventional configuration, and compared to the first embodiment, the delay time is reduced by 2(nm-n-m+1)L.
[0061] [Advantages of the second embodiment] Thus, according to this embodiment, even if the array data to be aggregated is two-dimensional array data, the number of communication ports through which the data is transferred can be reduced in each of the aggregation phase and distribution phase, as compared to the conventional configuration shown in Fig. 2, and as a result, the delay time can be reduced. Therefore, it is possible to further improve the delay performance of Allreduce in the interconnect of heterogeneous computing. In addition, since the number of ports used is reduced, it is possible to reduce power consumption, procurement costs, and failure response.
[0062] [Third embodiment] Next, a distributed processing system 10 according to a third embodiment of the present invention will be described with reference to Fig. 7 and Fig. 8. Fig. 7 is a block diagram showing the configuration and operation of the distributed processing system according to the third embodiment. Fig. 8 is a block diagram showing the configuration and operation (continuation) of the distributed processing system according to the third embodiment. 7 and 8, an example was described in which, when array data to be aggregated is divided into a plurality of blocks, aggregation and distribution processing is performed between the blocks using the second pipeline connection PL2. In this embodiment, when array data to be aggregated is two-dimensional array data (first array data, second array data), in addition to the second pipeline connection PL2, a third pipeline connection PL3 configured by connecting blocks via a third communication line L3 using the head NIC#1 of each block B#1, #2, #3 is used to perform aggregation and distribution processing between a plurality of blocks.
[0063] As shown in Figures 7 and 8, the distributed processing system 10 of this embodiment has m (m is an integer of 2 or more) blocks B, each of which is made up of n (n is an integer of 2 or more) processors P and a communication interface NIC, similar to the above-mentioned Figures 4 and 5. In this embodiment, as shown in Figures 7 and 8, a case where n = 3 and m = 3 will be described as an example, but this is not limited to this, and this embodiment can be applied in the same manner as described below even if n = 2 or n ≧ 4, or m = 2 or m ≧ 4.
[0064] In the intra-block aggregation phase and intra-block distribution phase, as shown in Fig. 3 and Fig. 4, the communication line L1 is used for data communication in only one direction, and the other direction is idle for data communication. In this embodiment, this idle communication line L1 is also used to execute aggregation operations and distribution processes in parallel in the forward and reverse orders of the first pipeline connection PL1 in each block B#1, #2, #3 for data of two different one-dimensional arrays.
[0065] In addition to the second pipeline connection PL2, a third pipeline connection PL3 is provided, and these two pipeline connections PL2, PL3 are used to aggregate two different one-dimensional array data in each block B#1, #2, #3, and perform aggregation operations and distribution processing between the blocks to obtain two aggregation results.
[0066] [Operation of the third embodiment] Next, the operation of the distributed processing system 10 and the distributed processing method according to the present embodiment will be described with reference to Figures 7, 8, and 9. Here, a case where an addition process is performed as an aggregation operation will be described. It is assumed that the first one-dimensional array data X1, X2, and X3 (first array data) and the second one-dimensional array data Y1, Y2, and Y3 (second array data) are distributed and held in each processor P1, P2, and P3 of each block B#1, B#2, and B#3, respectively.
[0067] [Intra-block aggregation phase] (first step S3-1, second step S3-2) In the intra-block aggregation phase, for each block B#1, #2, #3, an aggregation operation process for aggregating data X1, X2, X3 held by processors P1, P2, P3 in the block B#i (i=1, 2, 3) and an aggregation operation process for aggregating data Y1, Y2, Y3 are executed in parallel in forward and reverse order using the first pipeline connection PL1. At this time, the intra-block aggregation phase is executed in parallel in the first pipeline connection PL1 in each block B#1, #2, #3. As a result, an addition result XSi (=X1+X2+X3) (first aggregation result) is generated in NIC#3 located at the end of the first pipeline connection PL1 in each block B#1, #2, #3, and an addition result YSi (=Y1+Y2+Y3) (second aggregation result) is generated in NIC#1 located at the head of the first pipeline connection PL1. Details of the intra-block aggregation phase are the same as those in FIG. 3 described above, and a detailed description thereof will be omitted here.
[0068] [Inter-block aggregation / distribution phase] (third step S3-3, fourth step S3-4) After the intra-block aggregation phase is completed, an inter-block aggregation phase is executed to aggregate the sum results XSi and YSi generated in each block B#1, #2, #3. In this inter-block aggregation phase, the sum results XSi are aggregated in the second pipeline connection PL2 consisting of the tail NIC#3 of each block B#1, #2, #3, and the block sum results XB (=XS1+XS2+XS3) (first inter-block aggregation result) of all the blocks B#1, #2, #3 are generated in the NIC#3 of the block B#3 located at the tail of the second pipeline connection PL2.
[0069] Furthermore, the third pipeline connection PL3 consisting of the first NIC#1 of each block B#1, #2, #3 performs an aggregation operation on the sum results YSi, and the NIC#1 of the block B#3 located at the end of the third pipeline connection PL3 generates the block sum results YB (=YS1+YS2+YS3) (the second inter-block aggregation result) of all the blocks B#1, #2, #3. Note that the details of the inter-block aggregation phase are the same as those in FIG. 3 described above, and a detailed description thereof will be omitted here.
[0070] After the inter-block aggregation phase is completed, the inter-block distribution phase, which distributes the block addition results XB and YB of the entire blocks B#1, #2, #3 to each block B#1, #2, #3, is executed in parallel by the second pipeline connection PL2 and the third pipeline connection PL3. At this time, the block addition result XB is executed by the second pipeline connection PL2 in the order of blocks B#3, #1, #2, and the block addition result YB is executed by the third pipeline connection PL3 in the order of blocks B#3, #1, #2. The details of the inter-block distribution phase are the same as those in FIG. 4 described above, and a detailed description thereof will be omitted here.
[0071] [Intra-block distribution phase] (5th step S3-5, 6th step S3-6) After the inter-block distribution phase is completed, the inter-block distribution phase for distributing the block addition results XB, YB within each block B#1, #2, #3 is executed in parallel by the first pipeline connection PL1. At this time, the block addition result XB is executed by the first pipeline connection PL1 in a reverse order that is the reverse of the normal order of the intra-block aggregation phase. Also, the block addition result YB is executed by the first pipeline connection PL1 in a normal order that is the reverse of the normal order of the intra-block aggregation phase. The details of the intra-block distribution phase are the same as those of FIG. 4 described above, and a detailed description thereof will be omitted here.
[0072] [Advantages of the third embodiment] Thus, according to this embodiment, when the array data to be aggregated is two-dimensional array data, it is possible to execute the aggregation operation process and the distribution process in parallel for two different one-dimensional array data. This makes it possible to reduce the delay time caused by the communication port to the same extent as the configurations of Figs. 3 and 4, and to process twice the amount of data. Therefore, it is possible to obtain high data processing performance while improving the delay performance of Allreduce in the interconnect of heterogeneous computing. In addition, since the number of ports used is reduced, it is possible to reduce power consumption, procurement costs, and failure response.
[0073] [Extended embodiment] Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, the respective embodiments can be implemented in any combination within a range that does not contradict each other. [Explanation of symbols]
[0074] 10...distributed processing system, P, P#1, P#2, P#3...processors, NIC, NIC#1, NIC#2, NIC#3...communication interface, CNT, CNT#1, CNT#2, CNT#3...control circuit, PTA, PTB...communication port, PL1...first pipeline connection, PL2...second pipeline connection, PL3...third pipeline connection, B, B#1, B#2, B#3...block, L1...first communication line, L2...second communication line, L3...third communication line, X1, X2, X3, Y1, Y2, Y3...data, XS, XSi, XS1, XS2, XS3, YS, YSi, YS1, YS2, YS3...addition result, XB, YB...block addition result.
Claims
1. A distributed processing system comprising: a plurality of processors for performing arithmetic processing; and a plurality of communication interfaces provided corresponding to the plurality of processors, and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, wherein the plurality of communication interfaces perform an aggregation operation on first array data held in a distributed manner by each of the plurality of processors based on a Ring-Allreduce algorithm, and distribute the obtained aggregation result to each of the processors, a plurality of blocks each including the plurality of processors and the plurality of communication interfaces; the communication interfaces belonging to each of the blocks generate an aggregation result by performing an aggregation operation on the data belonging to the first array data output from each processor in a forward order consisting of a head communication interface located at the head of the first pipeline connection of the block, an intermediate communication interface located in the middle, and a tail communication interface located at the tail; the tail communication interfaces belonging to each of the blocks form a second pipeline connection by connecting the blocks via a second communication line, further aggregate the aggregated results obtained in each of the blocks by the second pipeline connection, and mutually distribute the obtained aggregated results between the blocks by the second pipeline connection; When an aggregation result between the blocks is obtained by the second pipeline connection, the communication interfaces belonging to each of the blocks start distributing the aggregation result between the blocks, distribute the aggregation result between the blocks in the reverse order of the tail communication interface, the intermediate communication interface, and the head communication interface, and output the aggregation result between the blocks to their own processors. A distributed processing system characterized by:
2. A distributed processing system comprising: a plurality of processors performing arithmetic processing; and a plurality of communication interfaces provided corresponding to the plurality of processors, and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, wherein the plurality of communication interfaces perform an aggregation processing on first array data and second array data that are distributed and held by each of the plurality of processors based on a Ring-Allreduce algorithm, and distribute the obtained aggregation result to each of the processors, a plurality of blocks each including the plurality of processors and the plurality of communication interfaces; the communication interfaces belonging to each of the blocks generate a first aggregation result by performing an aggregation operation on data belonging to the first array data output from each processor in a forward order consisting of a head communication interface located at the head of the first pipeline connection of the block, a middle communication interface located in the middle, and a tail communication interface located at the tail; the communication interfaces belonging to each of the blocks generate a second aggregation result by performing an aggregation operation on the data belonging to the second array data output from each processor in a reverse order of the tail communication interface, the middle communication interface, and the head communication interface; the tail communication interfaces belonging to each of the blocks form a second pipeline connection by connecting the blocks via a second communication line, further aggregate the first aggregation results obtained in each of the blocks by the second pipeline connection, and mutually distribute the obtained aggregation results between the first blocks by the second pipeline connection; the head communication interfaces belonging to each of the blocks form a third pipeline connection by connecting the blocks via a third communication line, further aggregate the second aggregated results obtained in each of the blocks by the third pipeline connection, and mutually distribute the obtained aggregated results between the second blocks by the third pipeline connection; The communication interfaces belonging to each of the blocks distribute the aggregation result between the first blocks obtained by the second pipeline connection in a reverse order of the tail communication interface, the intermediate communication interface, and the head communication interface, distribute the aggregation result between the second blocks obtained by the third pipeline connection in a forward order of the head communication interface, the intermediate communication interface, and the tail communication interface, and output the aggregation result between the first and second blocks to their own processors. A distributed processing system characterized by:
3. A distributed processing method for use in a distributed processing system, comprising a plurality of blocks each including a plurality of processors performing arithmetic processing, and a plurality of communication interfaces each corresponding to the plurality of processors and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, the plurality of communication interfaces performing an aggregation operation on first array data held in a distributed manner by each of the plurality of processors based on a Ring-Allreduce algorithm, and distributing the obtained aggregation result to each of the processors, a first step of generating an aggregation result by performing an aggregation operation on data belonging to the first array data output from each processor in a forward order of the communication interfaces belonging to each of the blocks, the first communication interface being located at the head of the first pipeline connection of the block, the intermediate communication interface being located in the middle, and the last communication interface being located at the end; a second step of forming a second pipeline connection by connecting the blocks via a second communication line through the tail communication interfaces belonging to each of the blocks, further aggregating the aggregation results obtained in each of the blocks through the second pipeline connection, and mutually distributing the aggregation results obtained between the blocks through the second pipeline connection; a third step of, when the tail communication interface belonging to each of the blocks obtains an aggregation result between the blocks through the second pipeline connection, starting distribution of the aggregation result between the blocks, distributing the aggregation result between the blocks in a reverse order from the tail communication interface, the intermediate communication interface, and the head communication interface, and outputting the aggregation result between the blocks to its own processor; A distributed processing method comprising:
4. A distributed processing system comprising a plurality of blocks each including a plurality of processors performing arithmetic processing, and a plurality of communication interfaces each corresponding to each of the plurality of processors and constituting a first pipeline connection by connecting the plurality of processors via a first communication line, wherein the plurality of communication interfaces perform an aggregation operation on first array data and second array data held in a distributed manner by each of the plurality of processors based on a Ring-Allreduce algorithm, and distribute the obtained aggregation result to each of the processors, a first step of generating a first aggregation result by performing an aggregation operation on data belonging to the first array data output from each processor in a forward order of the communication interfaces belonging to each of the blocks, the first communication interface being located at the head of the first pipeline connection of the block, the intermediate communication interface being located in the middle, and the last communication interface being located at the end; a second step of generating a second aggregation result by performing an aggregation operation on the data belonging to the second array data output from each processor in a reverse order of the communication interfaces belonging to each of the blocks, that is, the tail communication interface, the intermediate communication interface, and the head communication interface; a third step of forming a second pipeline connection by connecting the blocks via a second communication line through the tail communication interfaces belonging to each of the blocks, further aggregating the first aggregation results obtained in each of the blocks through the second pipeline connection, and mutually distributing the obtained aggregation results between the first blocks through the second pipeline connection; a fourth step of forming a third pipeline connection by connecting the blocks via a third communication line through the head communication interfaces belonging to each of the blocks, further aggregating the second aggregation results obtained in each of the blocks through the third pipeline connection, and mutually distributing the obtained aggregation results between the second blocks through the third pipeline connection; a fifth step in which the communication interfaces belonging to each of the blocks distribute the aggregation result between the first blocks obtained by the second pipeline connection in a reverse order from the tail communication interface, the intermediate communication interface, and the head communication interface, and output the aggregation result between the first blocks to their own processors; The communication interfaces belonging to each of the blocks are a sixth step of distributing the aggregation result between the second blocks obtained by the third pipeline connection in a normal order of the head communication interface, the middle communication interface, and the tail communication interface, and outputting the aggregation result between the second blocks to its own processor; A distributed processing method comprising:
Citation Information
Patent Citations
Distributed deep learning system and data transfer method
JP2020077300A
Embedding rings on a toroid computer network
WO2020193734A1
