WO2021106105A1 - 分散深層学習システム - Google Patents

分散深層学習システム Download PDF

Info

Publication number
WO2021106105A1
WO2021106105A1 PCT/JP2019/046373 JP2019046373W WO2021106105A1 WO 2021106105 A1 WO2021106105 A1 WO 2021106105A1 JP 2019046373 W JP2019046373 W JP 2019046373W WO 2021106105 A1 WO2021106105 A1 WO 2021106105A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
aggregated data
communication path
unit
gpu
Prior art date
Application number
PCT/JP2019/046373
Other languages
English (en)
French (fr)
Inventor
顕至 田仲
勇輝 有川
伊藤 猛
和彦 寺田
坂本 健
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US17/779,736 priority Critical patent/US20230004787A1/en
Priority to PCT/JP2019/046373 priority patent/WO2021106105A1/ja
Priority to JP2021560823A priority patent/JP7272460B2/ja
Publication of WO2021106105A1 publication Critical patent/WO2021106105A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/098Distributed learning, e.g. federated learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present invention relates to a distributed deep learning system that executes deep learning, which is machine learning using a neural network, in a distributed and coordinated manner on a plurality of nodes.
  • FIG. 28 is a block diagram showing the configuration of a conventional distributed deep learning system.
  • It has a network 200 to connect to.
  • the parent node 100-1 includes a CPU (Central Processing Unit) 101-1, a GPU 102-1 and an FPGA 103-1.
  • FIG. 29 is a functional block diagram of FPGA 103-1 of the parent node 100-1.
  • the FPGA 103-1 functions as a GPU reception buffer 120, a GPU transmission buffer 121, a network transmission buffer 122, 123, a network reception buffer 124, 125, a transmission unit 126, a transmission unit 128, and a reception unit 129.
  • the FPGA 103-k includes a GPU reception buffer 120, a GPU transmission buffer 121, a network transmission buffer 122, 123, a network reception buffer 124, 125, a transmission unit 126, a reception unit 127, a transmission unit 128, and a reception unit. Functions as 129.
  • the GPU 102-n of each node 100-n calculates the gradient with respect to the weight of the model to be trained, and adds the gradients by weight to calculate the variance data D.
  • the GPU 102-n of each node 100-n transfers the distributed data D to the GPU reception buffer 120 of the FPGA 103-n of the node 100-n by DMA (Direct Memory Access).
  • the data stored in the GPU reception buffer 120 is transferred to the free network transmission buffers 122 and 123.
  • the check flag is set. ..
  • the transmission unit 126 of the FPGA 103-1 of the parent node 100-1 is stored in the network transmission buffer 122 or 123 of the FPGA 103-1 when the check flag is set in all the nodes 100-n including the own node.
  • the distributed data D is taken out, and the taken out data is transmitted as the intermediate aggregated data Rt [1] to the node 100-2 having the next number via the communication path 201.
  • the addition unit 131 of the FPGA 103-k of the child node 100-k takes out the distributed data D stored in the network transmission buffer 122 or 123 of the FPGA 103-k. Then, the addition unit 131 generates the intermediate aggregated data Rt [k] by obtaining the sum of the extracted distributed data D and the intermediate aggregated data Rt [k-1] received from the communication path 201.
  • the receiving unit 129 of the FPGA 103-1 of the parent node 100-1 receives the intermediate aggregated data Rt [N] from the node 100-N via the communication path 201.
  • the transmission unit 128 of the FPGA 103-1 of the parent node 100-1 transmits the received intermediate aggregated data Rt [N] as the aggregated data R to the node 100-2 having the next number via the communication path 201.
  • the receiving unit 129 of the FPGA 103-1 of the parent node 100-1 vacates the aggregated data R received from the node 100-N via the communication path 201 among the network reception buffers 124 and 125 of the FPGA 103-1. Transfer to the direction.
  • the data stored in the network receive buffer 124 or 125 is transferred to the GPU transmit buffer 121 of the FPGA 103-1.
  • the data stored in the GPU transmission buffer 121 is DMA-transferred to the GPU 102-1.
  • the receiving unit 129 of the FPGA 103-k of the child node 100-k receives the aggregated data R received from the node 100- (k-1) via the communication path 201 of the network reception buffers 124 and 125 of the FPGA 103-k. Transfer to the vacant one.
  • the data stored in the network receive buffer 124 or 125 is transferred to the GPU transmit buffer 121 of the FPGA 103-k.
  • the data stored in the GPU transmission buffer 121 is DMA-transferred to the GPU 102-k.
  • the present invention has been made to solve the above problems, and an object of the present invention is to provide a distributed deep learning system capable of reducing the overhead of Allreduce processing.
  • the distributed deep learning system (first to fifth embodiments) of the present invention includes a plurality of nodes connected to each other via a network, and each node is distributed data for each weight of the model to be trained.
  • a plurality of GPUs configured to generate, a plurality of first receive buffers configured to store the distributed data from the GPU, and the distributed data transferred from the first receive buffer. Transferred from a plurality of first transmit buffers configured to store, a plurality of second receive buffers configured to store aggregated data received from other nodes, and the second receive buffer.
  • a check flag is set when the data is stored in the second transmit buffer configured to store the aggregated data and the first transmit buffer and the second receive buffer is free.
  • the data is stored in the first transmission buffer.
  • the distributed data is transmitted to the node of the next number as the first aggregated data and functions as a node other than the first of the plurality of nodes, the updated first aggregated data is sent to the next number.
  • the first transmitter configured to transmit to a node of, and a node other than the first of the plurality of nodes, it is configured to receive the first aggregated data from other nodes.
  • the distributed data stored in the first transmission buffer and the first receiving unit received by the first receiving unit.
  • the update when the addition unit is configured to obtain the sum of the aggregated data for each weight and generate the first aggregated data after the update, and when it functions as the first node among the plurality of nodes.
  • a second receiving unit configured to receive the second aggregated data when receiving the later first aggregated data and functioning as a node other than the first of the plurality of nodes, and the plurality of said.
  • a second transmitter configured to transmit the second aggregated data received by the second receiver to the node with the next number when functioning as a node other than the first, and the first transmitter.
  • Receive A first transfer unit configured to transfer the distributed data stored in the buffer to the first transmission buffer and DMA transfer the aggregated data stored in the second transmission buffer to the plurality of GPUs.
  • the plurality of GPUs include the second transfer unit configured to transfer the aggregated data stored in the second receive buffer to the second transmission buffer, and the plurality of GPUs transfer the distributed data to the plurality of. It is characterized by DMA transfer to the first receive buffer.
  • a plurality of communication paths are set in the network, and each node has the plurality of GPUs and the same number of communication paths as described above.
  • Each GPU is DMA-transferred by a third transmission unit configured to DMA-transfer the distributed data to the corresponding first reception buffer, and the first transfer unit.
  • a third receiving unit configured to receive the second aggregated data and a fourth receiving unit configured to transmit the second aggregated data received by the third receiving unit to another GPU.
  • the transmitting unit, the fourth receiving unit configured to receive the second aggregated data transmitted from another GPU, the second aggregated data received by the third receiving unit, and the fourth aggregated data.
  • the model based on the aggregation processing unit configured to generate the third aggregation data by obtaining the sum of the second aggregation data received by the receiving unit for each weight, and the third aggregation data.
  • the first transfer unit includes an update unit configured to update the data, and the first transfer unit uses the distributed data stored in the first receive buffer corresponding to one communication path to correspond to the communication path.
  • DMA Transferred to one transmission buffer, DMA transfer the second aggregated data stored in the second transmission buffer corresponding to one communication path to the GPU corresponding to this communication path, and the second transfer unit
  • the second aggregated data stored in the second receive buffer corresponding to one communication path is transferred to the second transmission buffer corresponding to this communication path, and the monitoring unit receives the first transmission buffer.
  • the check flag corresponding to this communication path occurs.
  • the check flag corresponding to the same communication path is set in all the nodes including the own node.
  • the same communication path is used.
  • the distributed data stored in the corresponding first transmission buffer is transmitted as the first aggregated data to the node of the next number via the same communication path, and the addition unit corresponds to one communication path.
  • the sum of the distributed data stored in the first transmission buffer and the first aggregated data received by the first receiver from this communication path is obtained for each weight, and the first aggregated data after the update is obtained. Is characterized in that.
  • a plurality of communication paths are set in the network, and each node has the plurality of GPUs and the same number of communication paths as the communication paths.
  • Each GPU includes a third transmission unit configured to DMA transfer the distributed data to any of the plurality of first reception buffers, and DMA by the first transfer unit.
  • a third receiving unit configured to receive the transferred second aggregated data and a second receiving unit configured to transmit the second aggregated data received by the third receiving unit to another GPU.
  • the transmission unit of 4 the fourth receiving unit configured to receive the second aggregated data transmitted from another GPU, the second aggregated data received by the third receiving unit, and the second aggregated data.
  • Based on the aggregation processing unit configured to generate the third aggregation data by obtaining the sum of the second aggregation data received by the receiving unit 4 for each weight, and the third aggregation data.
  • the first transfer unit includes an update unit configured to update the model, and the first transfer unit corresponds to the communication path with distributed data stored in the first receive buffer corresponding to one communication path.
  • the second aggregated data transferred to the first transmit buffer and stored in the second transmit buffer corresponding to one communication path is DMA-transferred to the GPU corresponding to the second aggregated data, and the first The transfer unit 2 transfers the second aggregated data stored in the second receive buffer corresponding to one communication path to the second transmission buffer corresponding to this communication path, and the monitoring unit transfers the second aggregate data to the second transmission buffer corresponding to this communication path.
  • this communication path occurs when the storage of data in the first transmit buffer and the free space of the second receive buffer occur in the first transmit buffer and the second receive buffer corresponding to the same communication path.
  • the check flag corresponding to When the check flag corresponding to is set and the first transmitter functions as the first node among the plurality of nodes, the check corresponding to the same communication path in all the nodes including the own node is set. Previously when the flag was set and at least one node did not have the check flag corresponding to another path set.
  • the distributed data stored in the first transmission buffer corresponding to the same communication path is transmitted as the first aggregated data to the node of the next number via the same communication path, and the addition unit ,
  • the distributed data generated by the GPU of the same set as the GPU that generated the first aggregated data received from the other node by the first receiving unit is stored in the first transmission buffer. It is characterized in that the sum of the distributed data and the first aggregated data received by the first receiving unit is obtained for each weight to generate the updated first aggregated data.
  • a plurality of communication paths are set in the network, and each node has the plurality of GPUs and the same number of communication paths as the communication paths.
  • Each GPU includes a third transmission unit configured to DMA transfer the distributed data to a first reception buffer that is not busy among the plurality of first reception buffers, and the first transmission unit.
  • the model is updated based on the third receiving unit configured to receive the second aggregated data DMA-transferred by the transfer unit 1 and the second aggregated data received by the third receiving unit.
  • the first transfer unit includes an update unit configured to perform the above, and the first transfer unit uses the distributed data stored in the first receive buffer corresponding to one communication path to the first transfer unit corresponding to this communication path.
  • the data is transferred to the transmission buffer, and the second aggregated data stored in the second transmission buffer corresponding to one communication path is DMA-transferred to the GPU corresponding to this communication path.
  • the second aggregated data stored in the second receive buffer corresponding to one communication path is transferred to the second transmission buffer corresponding to this communication path, and the monitoring unit transfers the second aggregated data to the first transmission buffer.
  • the check flag corresponding to this communication path is set. Then, when the first transmitter functions as the first node among the plurality of nodes and all the check flags are set in all the nodes including the own node, the plurality of first transmitters.
  • the distributed data stored in the transmission buffer of 1 is transmitted as the first aggregated data to the node of the next number via the communication path corresponding to the first transmission buffer of the storage source, and the addition unit is described.
  • the sum of the distributed data stored in the plurality of first transmission buffers corresponding to the plurality of communication paths and the first aggregated data received by the first receiving unit from the plurality of communication paths is obtained for each weight. It is characterized in that the first aggregated data after the update is generated.
  • a plurality of communication paths are set in the network, and each node has the plurality of GPUs and the same number of communication paths as the communication paths.
  • Each GPU is configured to DMA-transfer the distributed data to the first non-busy reception buffer among the plurality of first reception buffers.
  • a transmission unit of 3 a third receiving unit configured to receive the second aggregated data DMA-transferred by the first transfer unit, and a second aggregate received by the third receiving unit.
  • the first transfer unit includes an update unit configured to update the model based on the data, and the first transfer unit communicates the distributed data stored in the first receive buffer corresponding to one communication path.
  • the data is transferred to the first transmission buffer corresponding to the road, the second aggregated data stored in the second transmission buffer is DMA-transferred to the plurality of GPUs, and the second transfer unit is the plurality of.
  • the second aggregated data stored in any of the second receive buffers is transferred to the second transmit buffer, and the monitoring unit stores the data in the first transmit buffer and receives the second receive.
  • the check flag corresponding to this communication path is set, and the first transmitter sets the check flag.
  • Each of the data is transmitted as the first aggregated data to the node of the next number via the communication path corresponding to the first transmission buffer of the storage source, and the addition unit is the plurality of data corresponding to the plurality of communication paths.
  • the sum of the distributed data stored in the first transmission buffer of the above and the first aggregated data received by the first receiving unit from the plurality of communication paths is obtained for each weight, and the first aggregated data after the update is obtained. It is characterized by generating data.
  • the distributed deep learning system (sixth embodiment) of the present invention includes a plurality of nodes connected to each other via a network, and each node generates distributed data for each weight of the model to be trained.
  • a plurality of GPUs configured in the above, a plurality of first receive buffers configured to store the distributed data from the GPU, and a plurality of the distributed data transferred from the plurality of first receive buffers.
  • a first adder configured to generate the first aggregated data by calculating the sum of the first aggregated data for each weight, and a plurality of first transmission buffers configured to store the first aggregated data.
  • a plurality of second receive buffers configured to store aggregated data received from other nodes, and a second configured to store the aggregated data transferred from the second receive buffer.
  • a transmission buffer configured to set a check flag when data is stored in the first transmission buffer and the second reception buffer is free, and one of the plurality of nodes.
  • the check flag is set in all the nodes including the own node when functioning as the second node
  • the first aggregated data stored in the first transmit buffer is used as the second aggregated data as the next
  • a first transmission configured to transmit the updated second aggregated data to the next numbered node when it is transmitted to the numbered node and functions as a node other than the first of the plurality of nodes.
  • a unit a first receiving unit configured to receive second aggregated data from other nodes when functioning as a node other than the first of the plurality of nodes, and the plurality of nodes.
  • the sum of the first aggregated data stored in the first transmit buffer and the second aggregated data received by the first receiver is calculated for each weight.
  • the second addition unit configured to generate the second aggregated data after the update, and the second aggregated data after the update when functioning as the first node among the plurality of nodes.
  • a second receiver configured to receive the third aggregated data when receiving and functioning as a node other than the first of the plurality of nodes, and the first node of the plurality of nodes.
  • the second aggregated data received by the second receiver is transmitted as the third aggregated data to the node having the next number, and functions as a node other than the first of the plurality of nodes.
  • the second transmitting unit configured to transmit the third aggregated data received by the second receiving unit to the node having the next number, and the distributed data stored in the first receiving buffer are the first.
  • a first transfer unit configured to transfer data to the addition unit 1 and DMA transfer the third aggregated data stored in the second transmission buffer to the plurality of GPUs, and the second receive buffer.
  • the plurality of GPUs include the second transfer unit configured to transfer the third aggregated data stored in the second transmission buffer to the second transmission buffer, and the plurality of GPUs receive the distributed data in the plurality of first receptions. It is characterized in that it is DMA-transferred to a buffer and the model is updated based on the third aggregated data.
  • one communication path is set in the network, and each node has the plurality of GPUs and the same number of GPUs as the first. 1 reception buffer, the plurality of first reception buffers, the plurality of second reception buffers, the same number of the second transmission buffers as the communication path, the monitoring unit, and the first and first reception buffers.
  • a second transmitting unit, the first and second receiving units, the adding unit, the first transfer unit, and the second transfer unit are provided, and each GPU is provided with the plurality of first transfer units.
  • Receives a third transmission unit configured to DMA transfer the distributed data to a first non-busy reception buffer among the reception buffers, and a third aggregated data DMA-transferred by the first transfer unit.
  • the second transfer unit includes a third receiving unit configured as described above and an updating unit configured to update the model based on the third aggregated data received by the third receiving unit.
  • the unit transfers the third aggregated data stored in any of the plurality of second reception buffers to the second transmission buffer, and the monitoring unit stores the data in the first transmission buffer.
  • the second adding unit is the sum of the first aggregated data stored in any of the plurality of first transmission buffers and the second aggregated data received by the first receiving unit from the communication path. It is characterized in that the second aggregated data after the update is generated by obtaining each weight.
  • each GPU can execute other processing by the amount of the reduced DMA waiting time. Further, in the present invention, the network bandwidth can be effectively utilized by increasing the first transmission buffer as compared with the conventional technique. As a result, in the present invention, the overhead of Allreduce processing can be reduced.
  • FIG. 1 is a block diagram showing a configuration of a distributed deep learning system according to a first embodiment of the present invention.
  • FIG. 2 is a functional block diagram of the GPU according to the first embodiment of the present invention.
  • FIG. 3 is a functional block diagram of the FPGA of the parent node according to the first embodiment of the present invention.
  • FIG. 4 is a functional block diagram of the FPGA of the child node according to the first embodiment of the present invention.
  • FIG. 5 is a flowchart illustrating sample data input processing, gradient calculation processing, and in-GPU aggregation processing of each GPU of the node according to the first embodiment of the present invention.
  • FIG. 6 is a flowchart illustrating an inter-node Allduce process of the parent node according to the first embodiment of the present invention.
  • FIG. 1 is a block diagram showing a configuration of a distributed deep learning system according to a first embodiment of the present invention.
  • FIG. 2 is a functional block diagram of the GPU according to the first embodiment of the present
  • FIG. 7 is a flowchart illustrating an inter-node Allduce process of child nodes according to the first embodiment of the present invention.
  • FIG. 8 is a flowchart illustrating the GPU-to-GPU Allreduce process and the weight update process of each node according to the first embodiment of the present invention.
  • FIG. 9 is a flowchart illustrating the GPU-to-GPU Allreduce process of each node according to the first embodiment of the present invention.
  • FIG. 10 is a block diagram showing a configuration of a distributed deep learning system according to a third embodiment of the present invention.
  • FIG. 11 is a functional block diagram of the GPU according to the third embodiment of the present invention.
  • FIG. 12 is a functional block diagram of the FPGA of the parent node according to the third embodiment of the present invention.
  • FIG. 13 is a functional block diagram of the FPGA of the child node according to the third embodiment of the present invention.
  • FIG. 14 is a block diagram showing a configuration of a distributed deep learning system according to a fourth embodiment of the present invention.
  • FIG. 15 is a functional block diagram of the GPU according to the fourth embodiment of the present invention.
  • FIG. 16 is a functional block diagram of the FPGA of the parent node according to the fourth embodiment of the present invention.
  • FIG. 17 is a functional block diagram of the FPGA of the child node according to the fourth embodiment of the present invention.
  • FIG. 18 is a flowchart illustrating a node weight update process according to a fourth embodiment of the present invention.
  • FIG. 19 is a block diagram showing a configuration of a distributed deep learning system according to a fifth embodiment of the present invention.
  • FIG. 20 is a functional block diagram of the FPGA of the parent node according to the fifth embodiment of the present invention.
  • FIG. 21 is a functional block diagram of the FPGA of the child node according to the fifth embodiment of the present invention.
  • FIG. 22 is a block diagram showing a configuration of a distributed deep learning system according to a sixth embodiment of the present invention.
  • FIG. 23 is a functional block diagram of the FPGA of the parent node according to the sixth embodiment of the present invention.
  • FIG. 24 is a functional block diagram of the FPGA of the child node according to the sixth embodiment of the present invention.
  • FIG. 20 is a functional block diagram of the FPGA of the parent node according to the fifth embodiment of the present invention.
  • FIG. 21 is a functional block diagram of the FPGA of the child node according to the fifth embodiment of the present invention.
  • FIG. 22 is a block diagram showing
  • FIG. 25 is a flowchart illustrating an inter-node Allduce process of the parent node according to the sixth embodiment of the present invention.
  • FIG. 26 is a flowchart illustrating an inter-node Allduce process of child nodes according to a sixth embodiment of the present invention.
  • FIG. 27 is a block diagram showing a configuration example of a computer that realizes the nodes according to the first to sixth embodiments of the present invention.
  • FIG. 28 is a block diagram showing the configuration of a conventional distributed deep learning system.
  • FIG. 29 is a functional block diagram of the FPGA of the parent node of the conventional distributed deep learning system.
  • FIG. 30 is a functional block diagram of an FPGA of a child node of a conventional distributed deep learning system.
  • FIG. 1 is a block diagram showing a configuration of a distributed deep learning system according to a first embodiment of the present invention.
  • network 2 that connects the two to each other.
  • node 1-1 is a parent node, and nodes 1-2 to 1-4 are child nodes. Further, it is assumed that two communication paths 20-1 and 20-2 are set in the network 2.
  • the “node” means a device such as a server distributed on the network.
  • the parent node 1-1 includes a CPU 10-1, GPU 11-1-1, 11-1-2, and FPGA 12-1.
  • the GPU 11-n-j has a sample input unit 110 that receives sample data for training from a data collection node (not shown) and weights of the model 13-n (neural network) to be trained when the sample data is input.
  • a gradient calculation processing unit 111 that calculates the gradient of the loss function of the model 13-n for each sample data, and an aggregation processing unit that generates and holds distributed data that is a numerical value that aggregates the gradients for each sample data.
  • a weight update processing unit 113 that updates the weights of the model 13-n
  • a transmission unit 114 third transmission unit
  • a reception unit 115 third reception unit
  • a transmission unit 116 fourth transmission unit
  • It functions as a transmitting unit
  • a receiving unit 117 fourth receiving unit
  • an aggregation processing unit 118 The model 13-n (neural network) is a mathematical model constructed by software by the CPU 10-n.
  • FIG. 3 is a functional block diagram of FPGA 12-1 of the parent node 1-1.
  • the FPGA 12-1 includes GPU reception buffers 120-1, 120-2 (first reception buffer), GPU transmission buffers 121-1 and 121-2 (second transmission buffer), and network transmission buffer 122-1, 122-2, 123-1, 123-2 (first transmit buffer), network receive buffer 124-1, 124-2, 125-1, 125-2 (second receive buffer), and transmitter 126 (First transmitting unit), transmitting unit 128 (second transmitting unit), receiving unit 129 (second receiving unit), monitoring unit 130, transfer unit 132 (first transfer unit), It functions as a transfer unit 133 (second transfer unit).
  • the FPGA 12-k includes GPU reception buffers 120-1, 120-2, GPU transmission buffers 121-1 and 121-2, network transmission buffers 122-1, 122-2, 123-1 and 123-2, and a network.
  • GPU reception buffers 120-1 and 120-2 are provided in the FPGA 12-n of each node 1-n as many as the number of communication paths 20-1 and 20-2 set in the network 2. Further, GPU transmission buffers 121-1 and 121-2 are provided in the FPGA 12-n of each node 1-n as many as the number of communication paths 20-1 and 20-2.
  • FPGA12-n of each node 1-n two network transmission buffers 122-1 and 123-1 corresponding to the communication path 20-1 and two network reception buffers 124- corresponding to the communication path 20-1. 1,125-1 and so on are provided. Further, in FPGA12-n of each node 1-n, two network transmission buffers 122-2 and 123-2 corresponding to the communication path 20-2 and two network reception buffers 124- corresponding to the communication path 20-2. 2,125-2 are provided.
  • the present invention is limited to a method of collecting sample data by a data collection node and a method of distributing the collected sample data into N ⁇ J sets and distributing them to each GPU 11-n-j of each node 1-n. It is not applicable and can be applied to any of these methods.
  • the weight w [m] of the model 13-n, the loss function which is an index indicating the poor performance of the model 13-n, and the gradient Gj [m, n, s] of the loss function are well-known techniques. The explanation will be omitted.
  • the aggregation processing unit 112 of each GPU 11-n-j of the node 1-n converts the distributed data Dj [m, n], which is a numerical value obtained by summing the gradients G [m, n, s] for each sample data. It is generated and held for each weight w [m] (step S102 in FIG. 5).
  • the calculation formula for the distributed data Dj [m, n] is as follows.
  • the gradient calculation process by the gradient calculation processing unit 111 and the aggregation processing in the GPU by the aggregation processing unit 112 are pipelined in units of sample data (at the same time as performing the gradient calculation processing on a certain sample data, the previous one is performed. It is possible to simultaneously execute the aggregation process in the GPU that aggregates the gradients obtained from the sample data of.
  • each node 1-n performs inter-node Allreduce processing after generating the distributed data Dj [m, n].
  • FIG. 6 is a flowchart for explaining the inter-node Allduce process of the parent node 1-1
  • Each GPU 11-1-j asynchronously DMA transfers data to different GPU reception buffers 120-1 and 120-2. When the DMA transfer is congested, the subsequent DMA transfer is queued, and the DMA transfer is started as soon as the previous DMA transfer is completed.
  • the transfer unit 132 of the FPGA 12-1 of the parent node 1-1 monitors the network transmission buffers 122-1, 122-2, 123-1, 123-2 of the FPGA 12-1.
  • the transfer unit 132 stores data in the GPU reception buffer 120-1 of the FPGA 12-1, and if either of the network transmission buffers 122-1 and 123-1 is empty, the data is stored in the GPU reception buffer 120-1.
  • the data is transferred to the free network transmission buffers 122-1 and 123-1 (step S201 in FIG. 6).
  • the transfer unit 132 of the FPGA 12-1 stores data in the GPU reception buffer 120-2 of the FPGA 12-1, and if either of the network transmission buffers 122-2 and 123-2 is empty, the GPU reception buffer The data stored in 120-2 is transferred to the free network transmission buffers 122-2 and 123-2 (step S201).
  • the transmission unit 114 of each GPU 11-n-1 of the node 1-n transfers the distributed data D1 [m, n] to the GPU reception buffer 120-1 of the FPGA 12-n, and each of the nodes 1-n It will be described as assuming that the transmission unit 114 of the GPU 11-n-2 transfers the distributed data D2 [m, n] to the GPU reception buffer 120-2 of the FPGA 12-n.
  • the transfer unit 132 of the FPGA 12-k of the child node 1-k If data is stored in the GPU reception buffer 120-1 of the FPGA 12-k and one of the network transmission buffers 122-1 and 123-1 is empty, the transfer unit 132 of the FPGA 12-k of the child node 1-k , The data stored in the GPU reception buffer 120-1 is transferred to the free network transmission buffers 122-1 and 123-1 (step S301 in FIG. 7). Further, the transfer unit 132 of the FPGA 12-k stores data in the GPU reception buffer 120-2 of the FPGA 12-k, and if either of the network transmission buffers 122-2 and 123-2 is empty, the GPU reception buffer The data stored in 120-2 is transferred to the free network transmission buffers 122-2 and 123-2 (step S301).
  • the monitoring unit 130 of the FPGA 12-1 of the parent node 1-1 stores data in the network transmission buffer 122-1 or 123-1 of the FPGA 12-1, and the network reception buffers 124-1 and 125-1 of the FPGA 12-1. If either of them is empty (YES in step S202 of FIG. 6), the check flag F1 corresponding to the communication path 20-1 is set (step S203 of FIG. 6). Further, the monitoring unit 130 of the FPGA 12-1 stores data in the network transmission buffer 122-2 or 123-2 of the FPGA 12-1, and either of the network reception buffers 124-2 and 125-2 of the FPGA 12-1. If is empty (YES in step S202), the check flag F2 corresponding to the communication path 20-2 is set (step S203).
  • the monitoring unit 130 of the FPGA 12-k of the child node 1-k stores data in the network transmission buffer 122-1 or 123-1 of the FPGA 12-k, and the network reception buffer 124-1 of the FPGA 12-k, If either of 125-1 is empty (YES in step S302 of FIG. 7), the check flag F1 corresponding to the communication path 20-1 is set (step S303 of FIG. 7). Further, the monitoring unit 130 of the FPGA 12-k stores data in the network transmission buffer 122-2 or 123-2 of the FPGA 12-k, and either of the network reception buffers 124-2 and 125-2 of the FPGA 12-k. If is empty (YES in step S302), the check flag F2 corresponding to the communication path 20-2 is set (step S303).
  • the monitoring unit 130 of the FPGA 12-1 of the parent node 1-1 monitors the check flag managed by the monitoring unit 130 of the FPGA 12-k of each child node 1-k, and all the nodes 1 including the own node 1
  • the transmission unit 126 of the FPGA 12-1 is instructed to transmit data.
  • the transmission unit 126 of the FPGA 12-1 extracts the distributed data D1 [m, 1] stored in the network transmission buffer 122-1 or 123-1 of the FPGA 12-1, and extracts the extracted data into the intermediate aggregate data Rt1 [m, 1], the data is transmitted to the node 1-2 having the next number via the communication path 20-1 (step S205 in FIG. 6).
  • the intermediate aggregated data Rt1 [m, 1] at this time is the same as the distributed data D1 [m, 1].
  • Rt1 [m, 1] D1 [m, 1] ...
  • the monitoring unit 130 of the FPGA 12-1 of the parent node 1-1 is the transmitting unit of the FPGA 12-1 when the check flag F2 is set in all the nodes 1-n including the own node (YES in step S204).
  • Instruct 126 to transmit data The transmission unit 126 of the FPGA 12-1 extracts the distributed data D2 [m, 1] stored in the network transmission buffer 122-2 or 123-2 of the FPGA 12-1, and extracts the extracted data into the intermediate aggregate data Rt2 [m, 1], the data is transmitted to the node 1-2 having the next number via the communication path 20-2 (step S205).
  • the FPGA 12- of the intermediate node 1-i (i 2, ..., N-1) excluding the Nth node-
  • the intermediate aggregated data Rt1 [m, i] is generated by asking for (FIG. 7, step S305). That is, the intermediate aggregated data Rt1 [m, i] is composed of M numerical values.
  • the transmission unit 126 of the FPGA 12-i of the child node 1-i transmits the intermediate aggregated data Rt1 [m, i] generated by the addition unit 131 of the FPGA 12-i in response to the data reception from the communication path 20-1. , Is transmitted to the node 1- (i + 1) of the next number via the communication path 20-1 (FIG. 7, step S306).
  • the receiving unit 127 of the FPGA 12-i of the child node 1-i receives the intermediate aggregated data Rt2 [m, i-1] from the node 1- (i-1) via the communication path 20-2 ( Step S304).
  • the addition unit 131 of the FPGA 12-i of the child node 1-i takes out the distributed data D2 [m, i] stored in the network transmission buffer 122-2 or 123-2 of the FPGA 12-i. Then, the addition unit 131 adds the sum of the extracted distributed data D2 [m, i] and the intermediate aggregated data Rt2 [m, i-1] received from the communication path 20-2 for each corresponding weight w [m].
  • the intermediate aggregated data Rt2 [m, i] is generated by asking for (step S305).
  • the transmission unit 126 of the FPGA 12-i of the child node 1-i transmits the intermediate aggregated data Rt2 [m, i] generated by the addition unit 131 of the FPGA 12-i in response to the data reception from the communication path 20-2. , The data is transmitted to the node 1- (i + 1) having the next number via the communication path 20-2 (step S306).
  • the receiving unit 127 of the FPGA 12-N of the child node 1-N receives the intermediate aggregated data Rt1 [m, N-1] from the node 1- (N-1) via the communication path 20-1 (step). S304).
  • the addition unit 131 of the FPGA 12-N of the child node 1-N takes out the distributed data D1 [m, N] stored in the network transmission buffer 122-1 or 123-1 of the FPGA 12-N. Then, the addition unit 131 adds the sum of the extracted distributed data D1 [m, N] and the intermediate aggregated data Rt1 [m, N-1] received from the communication path 20-1 for each corresponding weight w [m]. To generate the intermediate aggregated data Rt1 [m, N] (step S305). That is, the intermediate aggregated data Rt1 [m, N] is composed of M numerical values.
  • the transmission unit 126 of the FPGA 12-N of the child node 1-N transmits the intermediate aggregate data Rt1 [m, N] generated by the addition unit 131 of the FPGA 12-N in response to the data reception from the communication path 20-1. , Is transmitted to the parent node 1-1 via the communication path 20-1 (step S306).
  • the intermediate aggregated data Rt1 [m, N] composed of M numerical values calculated by the equations (2), (3), and (4) is generated in each node 1-n. It is calculated based on the distributed data D1 [m, n] composed of M numerical values.
  • the value of the intermediate aggregated data Rt1 [m, N] can be expressed by the following formula.
  • the receiving unit 127 of the FPGA 12-N of the child node 1-N receives the intermediate aggregated data Rt2 [m, N-1] from the node 1- (N-1) via the communication path 20-2 ( Step S304).
  • the addition unit 131 of the FPGA 12-N of the child node 1-N takes out the distributed data D2 [m, N] stored in the network transmission buffer 122-2 or 123-2 of the FPGA 12-N. Then, the addition unit 131 adds the sum of the extracted distributed data D2 [m, N] and the intermediate aggregated data Rt2 [m, N-1] received from the communication path 20-2 for each corresponding weight w [m].
  • the intermediate aggregated data Rt2 [m, N] is generated by asking for (step S305).
  • the transmission unit 126 of the FPGA 12-N of the child node 1-N transmits the intermediate aggregate data Rt2 [m, N] generated by the addition unit 131 of the FPGA 12-N in response to the data reception from the communication path 20-2. , Is transmitted to the parent node 1-1 via the communication path 20-2 (step S306).
  • the receiving unit 129 of the FPGA 12-1 of the parent node 1-1 receives the intermediate aggregated data Rt1 [m, N] from the node 1-N via the communication path 20-1 (step S206 in FIG. 6).
  • the transmission unit 128 of the FPGA 12-1 of the parent node 1-1 uses the received intermediate aggregated data Rt1 [m, N] as the aggregated data R1 [m] as the aggregated data R1 [m], and the node 1 having the next number via the communication path 20-1.
  • -2 is transmitted (step S207 in FIG. 6).
  • the aggregated data R1 [m] is the same as the intermediate aggregated data Rt1 [m, N].
  • the transmitting unit 128 of the FPGA 12-1 of the parent node 1-1 receives the intermediate aggregated data Rt2 [m, N] when the receiving unit 129 receives the intermediate aggregated data Rt2 [m, N] from the node 1-N via the communication path 20-2.
  • the intermediate aggregated data Rt2 [m, N] is transmitted as aggregated data R2 [m] to the node 1-2 of the next number via the communication path 20-2 (step S207).
  • the receiving unit 129 of the FPGA 12-1 of the parent node 1-1 receives the aggregated data R1 [m] (intermediate aggregated data Rt1 [m, N]) received from the node 1-N via the communication path 20-1. , Transfer to the free network receive buffers 124-1 and 125-1 of FPGA12-1 (step S208 in FIG. 6). Similarly, the receiving unit 129 of the FPGA 12-1 of the parent node 1-1 receives the aggregated data R2 [m] received from the node 1-N via the communication path 20-2 in the network reception buffer 124- of the FPGA 12-1. Transfer to the vacant one of 2,125-2 (step S208).
  • the transfer unit 133 of the FPGA 12-1 of the parent node 1-1 takes out data from the full network reception buffer.
  • the extracted data is transferred to the GPU transmission buffer 121-1 of FPGA12-1 (step S209 in FIG. 6).
  • the transfer unit 133 of the FPGA 12-1 of the parent node 1-1 receives data from the full network reception buffer when either of the network reception buffers 124-2 and 125-2 of the FPGA 12-1 becomes full. Is taken out, and the taken out data is transferred to the GPU transmission buffer 121-2 of FPGA12-1 (step S209).
  • the transfer unit 132 of the FPGA 12-1 of the parent node 1-1 DMA-transfers the data stored in the GPU transmission buffer 121-1 of the FPGA 12-1 to the GPU 11-1-1 (step S210 in FIG. 6). Similarly, the transfer unit 132 of the FPGA 12-1 of the parent node 1-1 DMA-transfers the data stored in the GPU transmission buffer 121-2 of the FPGA 12-1 to the GPU 11-1-2 (step S210). With the above, the aggregated data Rj [m] received from the nodes 1-N via the communication paths 20-1 and 20-2 is transferred to the GPUs 11-1-1 and 11-1-2.
  • the receiving unit 129 receives the aggregated data R2 [m] from the node 1- (k-1) via the communication path 20-2
  • the transmitting unit 128 of the FPGA 12-k of the child node 1-k The received aggregated data R2 [m] is transmitted to the node 1-k + of the next number via the communication path 20-2 (step S308).
  • the receiving unit 129 of the FPGA 12-k of the child node 1-k receives the aggregated data R1 [m] received from the node 1- (k-1) via the communication path 20-1 via the network of the FPGA 12-k. Transfer to the vacant one of the buffers 124-1 and 125-1 (step S309 in FIG. 7). Similarly, the receiving unit 129 of the FPGA 12-k of the child node 1-k transmits the aggregated data R2 [m] received from the node 1- (k-1) via the communication path 20-2 to the network of the FPGA 12-k. Transfer to the free of the receive buffers 124-2 and 125-2 (step S309).
  • the transfer unit 133 of the FPGA 12-k of the child node 1-k retrieves data from the full network reception buffer. The extracted data is transferred to the GPU transmission buffer 121-1 of the FPGA 12-k (step S310 in FIG. 7). Similarly, when one of the network reception buffers 124-2 and 125-2 of the FPGA 12-k is full, the transfer unit 133 of the FPGA 12-k of the child node 1-k receives data from the full network reception buffer. Is taken out, and the taken out data is transferred to the GPU transmission buffer 121-2 of FPGA12-k (step S310).
  • the transfer unit 132 of the FPGA 12-k of the child node 1-k performs DMA transfer of the data stored in the GPU transmission buffer 121-1 of the FPGA 12-k to the GPU 11-k-1 (step S311 of FIG. 7). Similarly, the transfer unit 132 of the FPGA 12-k of the child node 1-k performs DMA transfer of the data stored in the GPU transmission buffer 121-2 of the FPGA 12-k to the GPU 11-k-2 (step S311). As described above, the aggregated data Rj [m] received from the node 1- (k-1) via the communication paths 20-1 and 20-2 is transferred to the GPU 11-k-1, 11-k-2.
  • FIG. 8 is a flowchart for explaining the GPU-to-GPU Allreduce process and the weight update process of GPU11-n-1 of each node 1-n
  • the GPU 11-n-1 of each node 1-n performs the weight update process as the representative GPU of that node.
  • the receiving unit 115 of the GPU 11-n-1 of each node 1-n receives the aggregated data R1 [m] stored in the GPU transmission buffer 121-1 of the FPGA 12-n (step S400 in FIG. 8).
  • the transmission unit 116 of the GPU 11-n-1 of each node 1-n transmits the aggregated data R1 [m] received by the reception unit 115 of the GPU 11-n-1 to the other GPU 11-n-2 (step 8). S401).
  • the receiving unit 115 of the GPU 11-n-2 of each node 1-n receives the aggregated data R2 [m] stored in the GPU transmission buffer 121-2 of the FPGA 12-n (step S500 in FIG. 9).
  • the transmission unit 116 of the GPU 11-n-2 of each node 1-n transmits the aggregated data R2 [m] received by the reception unit 115 of the GPU 11-n-2 to the other GPU 11-n-1 (step 9). S501).
  • the receiving unit 117 of the GPU 11-n-1 of each node 1-n receives the aggregated data R2 [m] transmitted from the GPU 11-n-2 (step S402 in FIG. 8).
  • the receiving unit 117 of the GPU 11-n-2 of each node 1-n receives the aggregated data R1 [m] transmitted from the GPU 11-n-1 (step S502 in FIG. 9).
  • the aggregation processing unit 118 of the GPU 11-n-1 of each node 1-n receives the aggregation data R1 [m] received by the reception unit 115 of the GPU 11-n-1 and the aggregation data R2 [m] received by the reception unit 117.
  • Aggregate data U [m] is generated by obtaining the sum with [m] for each corresponding weight w [m] (step S403 in FIG. 8).
  • the weight update processing unit 113 of the GPU 11-n-1 of each node 1-n performs a weight update process for updating the weight w [m] of the model 13-n in the own node based on the aggregated data U [m]. (FIG. 8 step S404).
  • the weight w [m] may be updated for each number m so that the loss function is minimized based on the gradient of the loss function indicated by the aggregated data U [m]. Since updating the weight w [m] is a well-known technique, detailed description thereof will be omitted.
  • each node 1-n With the end of the weight update process, one mini-batch learning is completed, and each node 1-n continuously performs the next mini-batch learning process based on the updated weight w [m]. That is, each node 1-n receives sample data for the next mini-batch learning from a data collection node (not shown), and repeats the mini-batch learning process described above to improve the inference accuracy of the model of its own node.
  • each GPU 11-n-j may execute other processing by the amount of the reduced DMA waiting time. it can. Further, in this embodiment, the bandwidth of the GPU-FPGA bus can be effectively utilized by using the DMA transfer queue. Further, in this embodiment, the network bandwidth can be effectively utilized by increasing the network transmission buffer.
  • each GPU 11-1-1 of node 1-n occupies the GPU reception buffer 120-1 and the GPU transmission buffer 121-1 of FPGA 12-n of node 1-n. Further, each GPU 11-1-2 of the node 1-n occupies the GPU reception buffer 120-2 and the GPU transmission buffer 121-2 of the FPGA 12-n of the node 1-n.
  • the transmission unit 114 of each GPU 11-n-1 of the node 1-n transfers the distributed data D1 [m, n] generated by the aggregation processing unit 112 of the GPU 11-n-1 to the FPGA 12- of the node 1-n.
  • DMA transfer is performed to the GPU reception buffer 120-1 of n (step S200 in FIG. 6).
  • the transmission unit 114 of each GPU 11-n-2 of the node 1-n transmits the distributed data D2 [m, n] generated by the aggregation processing unit 112 of the GPU 11-n-2 to the FPGA 12 of the node 1-n.
  • DMA transfer is performed to the GPU reception buffer 120-2 of ⁇ n (step S200).
  • the check flag F1 is set in all the nodes 1-n including the own node, and the check flag F2 is not set in at least one node ( YES) in step S204 of FIG. 6, instructing the transmission unit 126 of the FPGA 12-1 to transmit data.
  • the transmission unit 126 of the FPGA 12-1 extracts the distributed data D1 [m, 1] stored in the network transmission buffer 122-1 or 123-1 of the FPGA 12-1, and extracts the extracted data into the intermediate aggregate data Rt1 [m, 1], the data is transmitted to the node 1-2 having the next number via the communication path 20-1 (step S205 in FIG. 6).
  • the transmission unit 126 of the FPGA 12-1 is instructed to transmit data.
  • the transmission unit 126 of the FPGA 12-1 extracts the distributed data D2 [m, 1] stored in the network transmission buffer 122-2 or 123-2 of the FPGA 12-1, and extracts the extracted data into the intermediate aggregate data Rt2 [m, 1], the data is transmitted to the node 1-2 having the next number via the communication path 20-2 (step S205).
  • the inter-node Allreduce that aggregates the distributed data D1 [m, n] calculated by the GPU 11-n-1 of each node 1-n and distributes it to the GPU 11-n-1 of each node 1-n.
  • Realizes processing and inter-node Allreduce processing that aggregates the distributed data D2 [m, n] calculated by GPU11-n-2 of each node 1-n and distributes it to GPU11-n-2 of each node 1-n. can do.
  • each GPU 11-n-j may execute other processing by the amount of the reduced DMA waiting time. it can.
  • the bandwidth of the GPU-FPGA bus can be effectively utilized by using the DMA transfer queue.
  • the network bandwidth can be effectively utilized by increasing the network transmission buffer.
  • the inter-node Allreduc processing can be executed by one FPGA of each node 1-n, power saving and space saving can be realized.
  • FIG. 10 is a block diagram showing a configuration of a distributed deep learning system according to a third embodiment of the present invention.
  • the parent node 1a-1 includes a CPU 10-1, GPUs 11a-1-1 to 11a-1-4, and FPGA 12a-1.
  • the GPU 11a-n-j includes a sample input unit 110, a gradient calculation processing unit 111, an aggregation processing unit 112, a weight update processing unit 113, a transmission unit 114a, a reception unit 115, a transmission unit 116, and a reception unit. It functions as 117 and the aggregation processing unit 118.
  • FIG. 12 is a functional block diagram of FPGA 12a-1 of the parent node 1a-1.
  • the FPGA 12a-1 includes GPU reception buffers 120-1, 120-2, GPU transmission buffers 121-1 and 121-2, network transmission buffers 122-1, 122-2, 123-1 and 123-2, and a network. It functions as reception buffers 124-1, 124-2, 125-1, 125-2, transmission unit 126, transmission unit 128, reception unit 129, monitoring unit 130, transfer unit 132a, and transfer unit 133. ..
  • the FPGA 12a-k includes GPU reception buffers 120-1, 120-2, GPU transmission buffers 121-1 and 121-2, network transmission buffers 122-1, 122-2, 123-1 and 123-2, and a network.
  • the transmission unit 114a of each GPU 11a-1-j of the parent node 1a-1 transmits the distributed data Dj [m, 1] generated by the aggregation processing unit 112 of the GPU 11a-1-j. , DMA transfer to either the GPU reception buffer 120-1 or the GPU reception buffer 120-2 of the FPGA 12a-1 of the parent node 1a-1 (step S200 in FIG. 6).
  • DMA transfer is congested, the subsequent DMA transfer is queued, and the DMA transfer is started as soon as the previous DMA transfer is completed.
  • the transmission unit 114a adds the identifier of the GPU 11a-1-j that generated the distributed data Dj [m, 1] to the distributed data Dj [m, 1].
  • the processes of steps S201 to S203 of FIG. 6 are as described in the first embodiment.
  • the transmission unit 114a of each GPU 11a-k-j of the child node 1a-k transmits the distributed data Dj [m, k] generated by the aggregation processing unit 112 of the GPU 11a-k-j to the child node 1a-k.
  • DMA transfer is performed to either the GPU reception buffer 120-1 or the GPU reception buffer 120-2 of the FPGA 12a-k (FIG. 7, step S300).
  • the transmission unit 114a adds the identifier of the GPU 11a-k-j that generated the distributed data Dj [m, k] to the distributed data Dj [m, k].
  • the processes of steps S301 to S303 of FIG. 7 are as described in the first embodiment.
  • the transmission unit 114a of the GPU 11a-n-1 and the GPU 11a-n-3 of the node 1an sets the distributed data D1 [m, n] and D3 [m, n] to the GPU reception buffer 120 of the FPGA 12a-n. Transferred to -1, the transmitter 114a of GPU11a-n-2 and GPU11a-n-4 of node 1an sends the distributed data D2 [m, n] and D4 [m, n] to the GPU reception buffer of FPGA12a-n. It will be described as being transferred to 120-2.
  • the check flag F1 is set in all the nodes 1a-n including the own node, and the check flag F2 is not set in at least one node (FIG. 6).
  • the transmission unit 126 of the FPGA 12a-1 is instructed to transmit data.
  • the transmission unit 126 of the FPGA 12a-1 extracts the distributed data D1 [m, 1] or D3 [m, 1] stored in the network transmission buffer 122-1 or 123-1 of the FPGA 12a-1, and extracts the extracted data.
  • the intermediate aggregated data Rt1 [m, 1] or Rt3 [m, 1] is transmitted to the node 1a-2 having the next number via the communication path 20-1 (step S205 in FIG. 6).
  • the transmission unit 126 of the FPGA 12a-1 is instructed to transmit data.
  • the transmission unit 126 of the FPGA 12a-1 extracts the distributed data D2 [m, 1] or D4 [m, 1] stored in the network transmission buffer 122-2 or 123-2 of the FPGA 12a-1, and extracts the extracted data.
  • the intermediate aggregated data Rt2 [m, 1] or Rt4 [m, 1] is transmitted to the next numbered node 1a-2 via the communication path 20-2 (step S205).
  • the FPGA 12a- of the intermediate node 1a-i (i 2, ..., N-1) excluding the Nth node.
  • the receiving unit 127 of i receives the intermediate aggregated data Rt1 [m, i-1] or Rt3 [m, i-1] from the node 1a- (i-1) via the communication path 20-1 (FIG. 7).
  • Step S304 Further, the receiving unit 127 of the FPGA 12a-i of the node 1a-i is connected to the intermediate aggregated data Rt2 [m, i-1] or Rt4 [m, i-1) from the node 1a- (i-1) via the communication path 20-2. -1] is received (step S304).
  • the addition unit 131a of the FPGA 12a-i of the child nodes 1a-i receives the intermediate aggregated data Rt1 [m, i-1], Rt2 [m, i-1], Rt3 [ m, i-1] and Rt4 [m, i-1] are temporarily stored. Then, the addition unit 131a of the FPGA 12a-i of the child nodes 1a-i has the same set of GPU11a-i as the GPU11a- (i-1) -j of the generation source of the received intermediate aggregated data Rtj [m, i-1].
  • the GPU11a- (i-1) -j from which the intermediate aggregated data Rtj [m, i-1] is generated can be identified by the identifier added to the intermediate aggregated data Rtj [m, i-1].
  • the GPU 11a-i-j from which the distributed data Dj [m, i] is generated can be identified by the identifier attached to the distributed data Dj [m, i].
  • the transmission unit 126 of the FPGA 12-i of the child nodes 1a-i transmits the intermediate aggregated data Rt1 [m, i] or Rt3 [m, i] generated by the addition unit 131a of the FPGA 12-i to the communication path 20-1. It is transmitted to the node 1a- (i + 1) having the next number via this (step S306 in FIG. 7). Further, the transmission unit 126 of the FPGA 12-i of the child nodes 1a-i transmits the intermediate aggregated data Rt2 [m, i] or Rt4 [m, i] generated by the addition unit 131a of the FPGA 12-i to the communication path 20-. It is transmitted to the node 1a- (i + 1) having the next number via 2 (step S306).
  • the receiving unit 127 of the FPGA 12a-N of the child nodes 1a-N receives the intermediate aggregated data Rt1 [m, N-1] or Rt3 [m, from the node 1a- (N-1) via the communication path 20-1. N-1] is received (step S304 in FIG. 7). Further, the receiving unit 127 of the FPGA 12a-N of the nodes 1a-N is the intermediate aggregated data Rt2 [m, N-1] or Rt4 [m, N] from the node 1a- (N-1) via the communication path 20-2. -1] is received (step S304).
  • the addition unit 131a of the FPGA 12a-N of the child nodes 1a-N receives the intermediate aggregated data Rt1 [m, N-1], Rt2 [m, N-1], Rt3 [ m, N-1] and Rt4 [m, N-1] are temporarily stored. Then, the addition unit 131a of the FPGA 12a-N of the child nodes 1a-N has the same set of GPU11a-N as the GPU11a- (N-1) -j of the generation source of the received intermediate aggregated data Rtj [m, N-1]. Distributed data when the distributed data Dj [m, N] generated by -j is stored in any of the network transmission buffers 122-1, 123-1, 122-2, 123-2 of FPGA12-N.
  • the addition unit 131a adds the sum of the extracted distributed data Dj [m, N] and the intermediate aggregated data Rtj [m, N-1] received from the communication path 20-1 or 20-2 to the corresponding weight w. By obtaining each [m], the intermediate aggregated data Rtj [m, N] is generated (FIG. 7, step S305).
  • the transmission unit 126 of the FPGA 12-N of the child nodes 1a-N transmits the intermediate aggregated data Rt1 [m, N] or Rt3 [m, N] generated by the addition unit 131a of the FPGA 12-N to the communication path 20-1. It is transmitted to the parent node 1a-1 via the above (step S306 in FIG. 7). Further, the transmission unit 126 of the FPGA 12-N of the child nodes 1a-N transmits the intermediate aggregated data Rt2 [m, N] or Rt4 [m, N] generated by the addition unit 131a of the FPGA 12-N to the communication path 20-. It is transmitted to the parent node 1a-1 via 2 (step S306).
  • the receiving unit 129 of the FPGA 12a-1 of the parent node 1a-1 receives the intermediate aggregated data Rt1 [m, N], Rt2 [m, N from the node 1a-N via the communication path 20-1 or 20-2. ], Rt3 [m, N], Rt4 [m, N] (FIG. 6, step S206).
  • the transmission unit 128 of the FPGA 12a-1 of the parent node 1a-1 uses the received intermediate aggregated data Rt1 [m, N] or Rt3 [m, N] as the aggregated data R1 [m] or R3 [m] as a communication path. It is transmitted to the node 1a-2 having the next number via 20-1 (step S207 in FIG. 6). Further, the transmission unit 128 of the FPGA 12a-1 of the parent node 1a-1 uses the received intermediate aggregated data Rt2 [m, N] or Rt4 [m, N] as the aggregated data R2 [m] or R4 [m]. It is transmitted to the node 1a-2 having the next number via the communication path 20-2 (step S207).
  • the receiving unit 129 of the FPGA 12a-1 of the parent node 1a-1 receives aggregated data R1 [m], R2 [m], R3 [ m] and R4 [m] are transferred to a free buffer among the network reception buffers 124-1, 125-1, 124-2, and 125-2 of the FPGA 12a-1 (step S208 in FIG. 6).
  • step S209 in FIG. 6 The process of step S209 in FIG. 6 is as described in the first embodiment.
  • the transfer unit 132a of the FPGA 12a-1 of the parent node 1a-1 has the aggregated data Rj [m]. Is DMA-transferred to the corresponding GPU 11a-1-j (step S210 in FIG. 6).
  • the correspondence between the aggregated data Rj [m] and the GPU 11a-1-j can be determined by the identifier attached to the aggregated data Rj [m].
  • the aggregated data Rj [m] received from the nodes 1a-N via the communication paths 20-1 and 20-2 is transferred to the GPU 11a-1-j.
  • the data R1 [m], R2 [m], R3 [m], and R4 [m] are received (step S307 in FIG. 7).
  • the receiving unit 129 of the FPGA 12a-k of the child node 1a-k receives the aggregated data R1 [m] and R2 [m] received from the node 1a- (k-1) via the communication path 20-1 or 20-2. ], R3 [m], R4 [m] are transferred to the vacant buffer among the network reception buffers 124-1, 125-1, 124-2, 125-2 of the FPGA 12ak (FIG. 7, step S309). ..
  • step S310 in FIG. 7 The process of step S310 in FIG. 7 is as described in the first embodiment.
  • the transfer unit 132a of the FPGA 12a-k of the child node 1a-k has the aggregated data Rj [m]. Is DMA-transferred to the corresponding GPU 11ak-j (step S311 in FIG. 7).
  • the aggregated data Rj [m] received from the node 1a- (k-1) via the communication paths 20-1 and 20-2 is transferred to the GPU 11a-k-j.
  • the GPU 11a-n-j of each node 1an performs an inter-GPU Allreduce process and a weight update process in the node. Since the flow of the Allreduce process between GPUs and the weight update process is the same as that of the first embodiment, the reference numerals of FIGS. 8 and 9 will be used for description.
  • the receiving unit 115 of the GPU 11a-n-1 of each node 1an receives the aggregated data R1 [m] from the FPGA 12a-n (step S400 in FIG. 8).
  • the transmission unit 116 of the GPU 11a-n-p of each node 1an uses the aggregated data Rp [m] received by the reception unit 115 of the GPU 11a-n-p as another GPU 11a-n-q (q is a natural number of J or less). Then, it is transmitted to p ⁇ q) (FIG. 9, step S501).
  • the receiving unit 117 of the GPU 11a-n-1 of each node 1an receives the aggregated data Rp [m] transmitted from the GPU 11a-n-p (step S402 in FIG. 8).
  • the receiving unit 117 of the GPU 11a-n-p of each node 1an receives the aggregated data Rq [m] transmitted from the GPU 11a-n-q (step S502 in FIG. 9).
  • the aggregation processing unit 118 of the GPU 11a-n-1 of each node 1an-1 receives the aggregation data R1 [m] received by the reception unit 115 of the GPU 11a-n-1 and the aggregation data Rp [m] received by the reception unit 117.
  • Aggregate data U [m] is generated by obtaining the sum with [m] for each corresponding weight w [m] (step S403 in FIG. 8).
  • the data R1 [m] which is the aggregate of the distributed data D1 [m, n] calculated by the GPU 11a-n-1 of each node 1an, and the GPU 11a-n-2 of each node 1an calculated.
  • the sum of the distributed data D4 [m, n] calculated by the GPU 11a-n-4 of each node 1an with the aggregated data R4 [m] can be obtained as the aggregated data U [m].
  • the process of step S404 in FIG. 8 is as described in the first embodiment.
  • each GPU 11a-n-j may execute other processing by the amount of the reduction of the DMA waiting time. it can.
  • the bandwidth of the GPU-FPGA bus can be effectively utilized by using the DMA transfer queue.
  • the network bandwidth can be effectively utilized by increasing the network transmission buffer.
  • the aggregation throughput in the node can be improved by operating each GPU 11a-n-j in parallel.
  • each GPU 11a-n-j creates an Allreduce queue in parallel, the bus bandwidth and network bandwidth can be used more effectively.
  • the inter-node Allreduc processing can be executed by one FPGA of each node 1an, power saving and space saving can be realized.
  • Allreduce processing which is the slowest processing in group communication, has occurred within or between nodes.
  • the Allreduce processing in the node is accelerated by the number of parallel GPUs, and the Allreduce processing between the nodes is also accelerated by the number of parallel GPUs.
  • FIG. 14 is a block diagram showing a configuration of a distributed deep learning system according to a fourth embodiment of the present invention.
  • the parent node 1b-1 includes a CPU 10-1, GPU 11b-1-1, 11b-1-2, and FPGA 12b-1.
  • the GPU 11bn-j functions as a sample input unit 110, a gradient calculation processing unit 111, an aggregation processing unit 112, a weight update processing unit 113, a transmission unit 114b, and a reception unit 115.
  • FIG. 16 is a functional block diagram of FPGA 12b-1 of the parent node 1b-1.
  • the FPGA 12b-1 includes GPU reception buffers 120-1, 120-2, GPU transmission buffers 121-1 and 121-2, network transmission buffers 122-1, 122-2, 123-1 and 123-2, and a network. It functions as reception buffers 124-1, 124-2, 125-1, 125-2, transmission unit 126, transmission unit 128, reception unit 129, monitoring unit 130b, transfer unit 132b, and transfer unit 133. ..
  • the FPGA 12b-k includes GPU reception buffers 120-1, 120-2, GPU transmission buffers 121-1 and 121-2, network transmission buffers 122-1, 122-2, 123-1 and 123-2, and a network.
  • the transmission unit 114b of each GPU 11b-1-j of the parent node 1b-1 transmits the distributed data Dj [m, 1] generated by the aggregation processing unit 112 of the GPU 11b-1-j. , DMA transfer to either the GPU reception buffer 120-1 or the GPU reception buffer 120-2 of the FPGA 12b-1 of the parent node 1b-1 (step S200 in FIG. 6).
  • the transmission unit 114b of each GPU 11b-1-j selects the one that is not currently busy (the one that is not used by another GPU) from the GPU reception buffer 120-1 and the GPU reception buffer 120-2, and distributes data. DMA transfer of Dj [m, 1]. The processes of steps S201 to S203 of FIG. 6 are as described in the first embodiment.
  • each GPU 11b-k-j of the child node 1b-k transmits the distributed data Dj [m, k] generated by the aggregation processing unit 112 of the GPU 11b-k-j to the child node 1b-k.
  • DMA transfer is performed to the one that is not currently busy (FIG. 7, step S300).
  • the transmission unit 114b of the GPU 11bn-1 of the node 1bn transfers the distributed data D1 [m, n] to the GPU reception buffer 120-1 of the FPGA 12bn, and the GPU 11b- of the node 1bn. It will be described as assuming that the transmission unit 114b of n-2 transfers the distributed data D2 [m, n] to the GPU reception buffer 120-2 of FPGA 12bn.
  • the processes of steps S301 to S303 of FIG. 7 are as described in the first embodiment.
  • the monitoring unit 130b of the FPGA 12b-1 of the parent node 1b-1 (YES in step S204 of FIG. 6), the FPGA 12b Instruct the transmission unit 126 of -1 to transmit data.
  • the transmission unit 126 of the FPGA 12b-1 extracts the distributed data D1 [m, 1] stored in the network transmission buffer 122-1 or 123-1 of the FPGA 12b-1, and extracts the extracted data into the intermediate aggregated data Rt1 [m, As 1], the data is transmitted to the node 1b-2 having the next number via the communication path 20-1 (step S205 in FIG. 6).
  • the transmission unit 126 of the FPGA 12b-1 extracts the distributed data D2 [m, 1] stored in the network transmission buffer 122-2 or 123-2 of the FPGA 12b-1, and extracts the extracted data into the intermediate aggregated data Rt2 [ As m, 1], the data is transmitted to the node 1b-2 having the next number via the communication path 20-2 (step S205).
  • the receiving unit 127 of the FPGA 12b-2 of the child node 1b-2 receives the intermediate aggregated data Rt1 [m, 1] from the parent node 1b-1 via the communication path 20-1 (step S304 in FIG. 7). .. Further, the receiving unit 127 of the FPGA 12b-2 of the child node 1b-2 receives the intermediate aggregated data Rt2 [m, 1] from the parent node 1b-1 via the communication path 20-2 (step S304).
  • the addition unit 131b of the FPGA 12b-2 of the child node 1b-2 temporarily stores the intermediate aggregated data Rt1 [m, 1] and Rt2 [m, 1] received from the communication paths 20-1 and 20-2.
  • the addition unit 131b transfers the distributed data D1 [m, 2] and D2 [m, 2] generated by the GPUs 11b-2-1 and 11b-2-2 to the network transmission buffers 122-1 and 123-1 of the FPGA 12b-2. , 122-2, 123-2.
  • the addition unit 131b receives the extracted distributed data D1 [m, 2], D2 [m, 2] and the intermediate aggregated data Rt1 [m, 1], Rt2 [m] received from the communication paths 20-1, 20-2.
  • 1] is calculated for each corresponding weight w [m] to generate intermediate aggregated data Rt [m, 2] (step S305 in FIG. 7).
  • the transmission unit 126 of the FPGA 12b-2 of the child node 1b-2 transfers the intermediate aggregated data Rt [m, 2] generated by the addition unit 131b of the FPGA 12b-2 via the communication paths 20-1, 20-2. (Fig. 7, step S306).
  • the addition unit 131b of the FPGA 12br of the child node 1br temporarily stores the intermediate aggregated data Rt [m, r-1] received from the communication paths 20-1 and 20-2.
  • the addition unit 131b transfers the distributed data D1 [m, 2] and D2 [m, 2] generated by GPU11br-1, 11br-2 to the network transmission buffers 122-1 and 123-1 of FPGA12br. , 122-2, 123-2. Then, the addition unit 131b combines the extracted distributed data D1 [m, 2] and D2 [m, 2] with the intermediate aggregated data Rt [m, r-1] received from the communication paths 20-1 and 20-2.
  • the intermediate aggregated data Rt [m, r] is generated (FIG. 7, step S305).
  • the intermediate aggregated data Rt [m, r-1] used for addition data from only one of the communication paths 20-1 and 20-2 may be used.
  • the receiving unit 129 of the FPGA 12b-1 of the parent node 1b-1 receives the intermediate aggregated data Rt [m, N] from the node 1b-N via the communication paths 20-1 and 20-2 (FIG. 6). Step S206).
  • the transmission unit 128 of the FPGA 12b-1 of the parent node 1b-1 uses the received intermediate aggregated data Rt [m, N] as the aggregated data U [m] and uses the following communication paths 20-1 and 20-2 as the following. It is transmitted to the node 1b-2 of the number (FIG. 6, step S207).
  • the receiving unit 129 of the FPGA 12b-1 of the parent node 1b-1 receives the aggregated data U [m] received from the node 1b-N via the communication paths 20-1 and 20-2 via the network of the FPGA 12b-1. Transfer to the vacant buffer of the buffers 124-1 and 125-1 and the vacant buffer of the network receive buffers 124-2 and 125-2 (step S208 of FIG. 6). At this time, the receiving unit 129 may transfer the aggregated data U [m] from only one of the communication paths 20-1 and 20-2.
  • step S209 The process of step S209 is as described in the first embodiment.
  • the transfer unit 132b of the FPGA 12b-1 of the parent node 1b-1 uses the aggregated data U [m] as the GPU 11b-1.
  • DMA transfer to -1 step S210 in FIG. 6
  • the transfer unit 132b of the FPGA 12b-1 of the parent node 1b-1 uses the aggregated data U [m] as the GPU 11b.
  • DMA transfer to 1-2 step S210.
  • the aggregated data U [m] received from the nodes 1b-N via the communication paths 20-1 and 20-2 is transferred to the GPU 11b-1-j.
  • the data U [m] is received (step S307 in FIG. 7).
  • the receiving unit 129 of the FPGA 12b-k of the child node 1b-k receives the aggregated data U [m] received from the node 1b- (k-1) via the communication paths 20-1, 20-2, and receives the aggregated data U [m] from the FPGA 12b-.
  • the data is transferred to the vacant buffer of the network receive buffers 124-1 and 125-1 of k and the vacant buffer of the network receive buffers 124-2 and 125-2 (FIG. 7, step S309).
  • step S310 in FIG. 7 The process of step S310 in FIG. 7 is as described in the first embodiment.
  • the transfer unit 132b of the FPGA 12b-k of the child node 1b-k uses the aggregated data U [m] as the GPU 11b-k.
  • DMA transfer to -1 step S311 in FIG. 7
  • the transfer unit 132b of the FPGA 12b-k of the parent node 1b-k uses the aggregated data U [m] as the GPU 11b.
  • DMA transfer to ⁇ k-2 step S311).
  • the aggregated data U [m] received from the node 1b- (k-1) via the communication paths 20-1 and 20-2 is transferred to the GPU 11b-k-j.
  • FIG. 18 is a flowchart illustrating the weight update process of the GPU 11bn-1 of the node 1bn.
  • the GPU 11bn-1 of each node 1bn performs the weight update process as the representative GPU of that node.
  • the receiving unit 115 of the GPU 11bn-1 of each node 1bn receives the aggregated data U [m] from the FPGA 12bn (step S600 in FIG. 18).
  • the weight update processing unit 113 of the GPU 11bn-1 of each node 1bn performs a weight update process for updating the weight w [m] of the model 13-n in the own node based on the aggregated data U [m]. This is performed (step S601 in FIG. 18).
  • each GPU 11bnj may execute other processing by the amount of the reduction of the DMA waiting time. it can. Further, in this embodiment, the bandwidth of the GPU-FPGA bus can be effectively utilized by using the DMA transfer queue. Further, in this embodiment, the network bandwidth can be effectively utilized by increasing the network transmission buffer. Further, in this embodiment, since the inter-node Allreduc processing can be executed by one FPGA of each node 1bn, power saving and space saving can be realized.
  • FIG. 19 is a block diagram showing a configuration of a distributed deep learning system according to a fifth embodiment of the present invention.
  • the parent node 1c-1 includes a CPU 10-1, GPUs 11c-1-1, 11c-1-2, and FPGA 12c-1.
  • FIG. 20 is a functional block diagram of FPGA 12c-1 of the parent node 1c-1.
  • the FPGA 12c-1 includes GPU reception buffers 120-1, 120-2, GPU transmission buffer 121, network transmission buffers 122-1, 122-2, 123-1, 123-2, and network reception buffers 124, 125.
  • the FPGA 12c-k includes GPU reception buffers 120-1, 120-2, GPU transmission buffer 121, network transmission buffers 122-1, 122-2, 123-1, 123-2, and network reception buffers 124, 125.
  • the same number of GPU reception buffers 120-1 and 120-2 as the communication paths 20-1 and 20-2 and the communication paths 20-1 and 20-2 are connected to the FPGA 12cn of each node 1cn.
  • a common GPU transmission buffer 121 is provided.
  • two network transmission buffers 122-1 and 123-1 corresponding to the communication path 20-1 are provided in the FPGA 12cn of each node 1cn.
  • two network transmission buffers 122-2 and 123-2 corresponding to the communication path 20-2 are provided in the FPGA 12cn of each node 1cn.
  • the FPGA 12cn of each node 1cn is provided with two network reception buffers 124 and 125 common to the communication paths 20-1 and 20-2.
  • the transmission unit 114b of each GPU 11c-1-j of the parent node 1c-1 transfers the distributed data Dj [m, 1] generated by the aggregation processing unit 112 of the GPU 11c-1-j to the FPGA 12c- of the parent node 1c-1. DMA transfer is performed to either one of the GPU reception buffer 120-1 and the GPU reception buffer 120-2 of No. 1 (step S200 in FIG. 6).
  • each GPU 11c-1-j is the GPU reception buffer 120-1 and the GPU reception buffer 120-2, whichever is not currently busy (used by another GPU). Select the one that does not exist) and transfer the distributed data Dj [m, 1] by DMA.
  • the processes of steps S201 to S207 of FIG. 6 are as described in the fourth embodiment.
  • the transmission unit 114b of each GPU 11c-k-j of the child node 1c-k uses the distributed data Dj [m, k] generated by the aggregation processing unit 112 of the GPU 11c-k-j to transfer the distributed data Dj [m, k] of the child node 1c-k to the FPGA 12c-.
  • DMA transfer is performed to the one that is not currently busy (step S300 in FIG. 7).
  • the processes of steps S301 to S308 in FIG. 7 are as described in the fourth embodiment.
  • the receiving unit 129 of the FPGA 12c-1 of the parent node 1c-1 receives the aggregated data U [m] received from the node 1c-N via the communication paths 20-1 and 20-2 in the network reception buffer 124 of the FPGA 12c-1. , 125, whichever is free (FIG. 6, step S208). At this time, the receiving unit 129 may transfer the aggregated data U [m] from only one of the communication paths 20-1 and 20-2.
  • the transfer unit 133c of the FPGA 12c-1 of the parent node 1c-1 takes out data from the full network receive buffer and takes out the taken out data.
  • the data is transferred to the GPU transmission buffer 121 of the FPGA 12c-1 (step S209 in FIG. 6).
  • the transfer unit 132c of the FPGA 12c-1 of the parent node 1c-1 DMA-transfers the data stored in the GPU transmission buffer 121 of the FPGA 12c-1 to the GPU 11c-1-1 and the GPU 11c-1-2 (step S210 in FIG. 6). ..
  • the aggregated data U [m] received from the nodes 1c-N via the communication paths 20-1 and 20-2 is broadcast-transferred to the GPUs 11c-1-1 and 11c-1-2.
  • the receiving unit 129 of the FPGA 12c-k of the child node 1c-k receives the aggregated data U [m] received from the node 1c- (k-1) via the communication paths 20-1 and 20-2 of the FPGA 12c-k. Transfer to the free network receive buffers 124 and 125 (step S309 in FIG. 7). At this time, the receiving unit 129 may transfer the aggregated data U [m] from only one of the communication paths 20-1 and 20-2.
  • the transfer unit 133c of the FPGA 12c-k of the child node 1c-k extracts data from the full network reception buffer and extracts the extracted data.
  • the data is transferred to the GPU transmission buffer 121 of the FPGA 12c-k (step S310 in FIG. 7).
  • the transfer unit 132c of the FPGA 12c-k of the child node 1c-k performs DMA transfer of the data stored in the GPU transmission buffer 121 of the FPGA 12c-k to the GPU 11c-k-1 and the GPU 11c-k-2 (step S311 in FIG. 7). ..
  • the aggregated data U [m] received from the node 1c- (k-1) via the communication paths 20-1 and 20-2 is broadcast-transferred to the GPU 11c-k-1 and 11c-k-2.
  • the weight update process of GPU11cnj of each node 1cn is the same as that of the fourth embodiment.
  • each GPU 11c-n-j of each node 1c-n may execute other processing by the amount of the reduction of the DMA waiting time. it can.
  • the bandwidth of the GPU-FPGA bus can be effectively utilized by using the DMA transfer queue.
  • the network bandwidth can be effectively utilized by increasing the network transmission buffer.
  • the inter-node Allreduc processing can be executed by one FPGA of each node 1cn, power saving and space saving can be realized.
  • the number of network receive buffers and GPU transmit buffers in the FPGA can be reduced as compared with the first to fourth embodiments, so that the circuit area can be reduced and the cost can be reduced. Can be reduced.
  • FIG. 22 is a block diagram showing a configuration of a distributed deep learning system according to a sixth embodiment of the present invention.
  • One communication path 20 is set in the network 2d.
  • the parent node 1d-1 includes a CPU 10-1, GPU 11d-1-1, 11d-1-2, and FPGA 12d-1.
  • FIG. 23 is a functional block diagram of FPGA 12d-1 of the parent node 1d-1.
  • the FPGA 12d-1 receives GPU reception buffers 120-1, 120-2, GPU transmission buffer 121, network transmission buffers 122, 123, network reception buffers 124, 125, transmission unit 126, transmission unit 128, and reception. It functions as a unit 129, a monitoring unit 130d, a transfer unit 132d, a transfer unit 133d, and an addition unit 134 (first addition unit).
  • the FPGA 12d-k transmits GPU reception buffers 120-1, 120-2, GPU transmission buffer 121, network transmission buffers 122, 123, network reception buffers 124, 125, transmission unit 126, reception unit 127, and transmission. It functions as a unit 128, a reception unit 129, a monitoring unit 130d, an addition unit 131d (second addition unit), a transfer unit 132d, a transfer unit 133d, and an addition unit 134 (first addition unit).
  • the FPGA 12dn of each node 1dn is provided with the same number of GPU reception buffers 120-1 and 120-2 as the GPU 11dnn and the same number of GPU transmission buffers 121 as the communication path 20. ing. Further, two network transmission buffers 122 and 123 and two network reception buffers 124 and 125 are provided in the FPGA 12dn of each node 1dn.
  • FIG. 25 is a flowchart for explaining the inter-node Allduce process of the parent node 1d-1
  • the transmission unit 114b of each GPU 11d-1-j of the parent node 1d-1 transmits the distributed data Dj [m, 1] generated by the aggregation processing unit 112 of the GPU 11d-1-j to the FPGA 12d- of the parent node 1d-1.
  • DMA transfer is performed to either one of the GPU reception buffer 120-1 and the GPU reception buffer 120-2 of FIG. 1 (step S700 in FIG. 25).
  • each GPU 11d-1-j is the GPU reception buffer 120-1 and the GPU reception buffer 120-2, whichever is not currently busy (used by another GPU). Select the one that does not exist) and transfer the distributed data Dj [m, 1] by DMA.
  • the transfer unit 132d of the FPGA 12d-1 of the parent node 1d-1 stores data in both the GPU reception buffers 120-1 and 120-2 of the FPGA 12d-1, and one of the network transmission buffers 122 and 123 is empty. If there is, the data stored in the GPU reception buffers 120-1 and 120-2 is transferred to the addition unit 134 (step S701 in FIG. 25).
  • the addition unit 134 of the FPGA 12d-1 of the parent node 1d-1 corresponds to the sum of the distributed data D1 [m, 1] and D2 [m, 1] received from the GPU reception buffers 120-1 and 120-2.
  • the intermediate aggregated data Rt [m, 1] is generated by obtaining each weight w [m] (step S702 in FIG. 25).
  • the addition unit 134 transfers the intermediate aggregated data Rt [m, 1] to the free network transmission buffers 122 and 123 of the FPGA 12d-1 (step S703 in FIG. 25).
  • the transmission unit 114b of each GPU 11d-k-j of the child node 1d-k transmits the distributed data Dj [m, k] generated by the aggregation processing unit 112 of the GPU 11d-k-j to the FPGA 12d- of the child node 1d-k.
  • DMA transfer is performed to the one that is not currently busy (step S800 in FIG. 26).
  • the transfer unit 132d of the FPGA 12d-k of the child node 1d-k stores data in both the GPU reception buffers 120-1 and 120-2 of the FPGA 12d-k, and one of the network transmission buffers 122 and 123 is empty. If so, the data stored in the GPU reception buffers 120-1 and 120-2 is transferred to the addition unit 134 (step S801 in FIG. 26).
  • the adder 134 of the FPGA 12dk of the child node 1dk corresponds to the sum of the distributed data D1 [m, k] and D2 [m, k] received from the GPU reception buffers 120-1 and 120-2.
  • intermediate aggregated data Rt [m, k] is generated (FIG. 26, step S802).
  • the addition unit 134 transfers the intermediate aggregated data Rt [m, k] to the free network transmission buffers 122 and 123 of the FPGA 12d-k (step S803 in FIG. 26).
  • the monitoring unit 130d of the FPGA 12d-1 of the parent node 1d-1 stores data in the network transmission buffer 122 or 123 of the FPGA 12d-1, and either of the network reception buffers 124 and 125 of the FPGA 12d-1 is empty. If (YES in step S704 of FIG. 25), the check flag F is set (step S705 of FIG. 25).
  • the monitoring unit 130d of the FPGA 12d-k of the child node 1d-k stores data in the network transmission buffer 122 or 123 of the FPGA 12d-k, and either of the network reception buffers 124 and 125 of the FPGA 12d-k If it is empty (YES in step S804 of FIG. 26), the check flag F is set (step S805 of FIG. 26).
  • the monitoring unit 130d of the FPGA 12d-1 of the parent node 1d-1 is the transmitting unit of the FPGA 12d-1 when the check flag F is set in all the nodes 1dn including the own node (YES in step S706 of FIG. 25).
  • Instruct 126 to transmit data The transmission unit 126 of the FPGA 12d-1 takes out the intermediate aggregated data Rt [m, 1] stored in the network transmission buffer 122 or 123 of the FPGA 12d-1, and uses the extracted data as the intermediate aggregated data Rz [m, 1]. , The data is transmitted to the node 1d-2 having the next number via the communication path 20 (step S707 in FIG. 25).
  • the intermediate aggregated data Rz [m, i-1] is received from i-1) via the communication path 20 (step S806 in FIG. 26).
  • the addition unit 131d of the FPGA 12d-i of the child node 1d-i takes out the intermediate aggregated data Rt [m, i] stored in the network transmission buffer 122 or 123 of the FPGA 12d-i. Then, the addition unit 131d adds the sum of the extracted intermediate aggregated data Rt [m, i] and the intermediate aggregated data Rz [m, i-1] received from the communication path 20 for each corresponding weight w [m]. By obtaining the data, the intermediate aggregated data Rz [m, i] is generated (FIG. 26, step S807).
  • the transmission unit 126 of the FPGA 12d-i of the child node 1d-i transmits the intermediate aggregated data Rz [m, i] generated by the addition unit 131d of the FPGA 12d-i to the node having the next number via the communication path 20. It is transmitted to 1d- (i + 1) (FIG. 26, step S808).
  • the receiving unit 127 of the FPGA 12d-N of the child node 1d-N receives the intermediate aggregated data Rz [m, N-1] from the node 1d- (N-1) via the communication path 20 (step S806). ..
  • the addition unit 131d of the FPGA 12d-N of the child node 1d-N takes out the intermediate aggregated data Rt [m, N] stored in the network transmission buffer 122 or 123 of the FPGA 12d-N. Then, the addition unit 131d adds the sum of the extracted intermediate aggregated data Rt [m, N] and the intermediate aggregated data Rz [m, N-1] received from the communication path 20 for each corresponding weight w [m]. By obtaining the data, the intermediate aggregated data Rz [m, N] is generated (step S807).
  • the transmission unit 126 of the FPGA 12d-N of the child node 1d-N transmits the intermediate aggregated data Rz [m, N] generated by the addition unit 131d of the FPGA 12d-N to the parent node 1d-1 via the communication path 20. (Step S808).
  • the receiving unit 129 of the FPGA 12d-1 of the parent node 1d-1 receives the intermediate aggregated data Rz [m, N] from the node 1d-N via the communication path 20 (step S708 in FIG. 25).
  • the transmission unit 128 of the FPGA 12d-1 of the parent node 1d-1 uses the received intermediate aggregated data Rz [m, N] as the aggregated data U [m] and uses the node 1d-2 of the next number via the communication path 20. (FIG. 25, step S709).
  • the receiving unit 129 of the FPGA 12d-1 of the parent node 1d-1 inputs the aggregated data U [m] (intermediate aggregated data Rz [m, N]) received from the node 1d-N via the communication path 20 to the FPGA 12d. Transfer to the free network receive buffers 124 and 125 of -1 (step S710 in FIG. 25).
  • the transfer unit 133d of the FPGA 12d-1 of the parent node 1d-1 takes out data from the full network receive buffer and takes out the taken out data.
  • the data is transferred to the GPU transmission buffer 121 of the FPGA 12d-1 (step S711 in FIG. 25).
  • the transfer unit 132d of the FPGA 12d-1 of the parent node 1d-1 DMA-transfers the data stored in the GPU transmission buffer 121 of the FPGA 12d-1 to the GPU 11d-1-1 and the GPU 11d-1-2 (step S712 in FIG. 25). ..
  • the aggregated data U [m] received from the nodes 1d-N via the communication path 20 is broadcast-transferred to the GPUs 11d-1-1 and 11d-1-2.
  • the receiving unit 129 of the FPGA 12d-k of the child node 1d-k receives the aggregated data U [m] from the node 1d- (k-1) via the communication path 20 (step S809 in FIG. 26).
  • the receiving unit 129 of the FPGA 12d-k of the child node 1d-k receives the aggregated data U [m] received from the node 1d- (k-1) via the communication path 20 in the network reception buffer 124 of the FPGA 12d-k. , 125, whichever is free (FIG. 26, step S811).
  • the transfer unit 133d of the FPGA 12d-k of the child node 1dk fetches data from the full network reception buffer and fetches the fetched data.
  • the data is transferred to the GPU transmission buffer 121 of the FPGA 12d-k (step S812 in FIG. 26).
  • the transfer unit 132d of the FPGA 12d-k of the child node 1d-k performs DMA transfer of the data stored in the GPU transmission buffer 121 of the FPGA 12d-k to the GPU 11d-k-1 and the GPU 11d-k-2 (step S813 in FIG. 26). ..
  • the aggregated data U [m] received from the node 1d- (k-1) via the communication path 20 is broadcast-transferred to the GPUs 11d-k-1, 11d-k-2.
  • the weight update process of GPU11dnj of each node 1dn is the same as that of the fourth embodiment.
  • each GPU 11dnj may execute other processing by the amount of the reduction of the DMA waiting time. it can.
  • the bandwidth of the GPU-FPGA bus can be effectively utilized by using the DMA transfer queue.
  • the network bandwidth can be effectively utilized by increasing the network transmission buffer.
  • the inter-node Allredo processing can be executed by one FPGA of each node 1dn, power saving and space saving can be realized.
  • the number of network receive buffers and GPU transmit buffers in the FPGA can be reduced as compared with the first to fourth embodiments, so that the circuit area can be reduced and the cost can be reduced. Can be reduced.
  • Each of the nodes described in the first to sixth embodiments is realized by a computer having a calculation unit such as a CPU and a GPU, a storage device, and an interface, a program for controlling these hardware resources, and an FPGA. can do.
  • a configuration example of this computer is shown in FIG.
  • the computer includes a calculation unit 300, a storage device 301, and an interface device (I / F) 302.
  • I / F interface device
  • the arithmetic unit 300 of each CPU, GPU, etc. of the node executes the processes described in the first to sixth embodiments according to the programs stored in the respective storage devices 301.
  • the present invention can be applied to a technique for performing machine learning of a neural network.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Multi Processors (AREA)

Abstract

分散深層学習システムは、ノード(1-n,n=1,・・・,4)と、ネットワーク(2)を備える。ノード(1-n)は、GPU(11-n-1,11-n-2)と、FPGA(12-n)を備える。FPGA(12-n)は、複数のGPU受信バッファと、GPU受信バッファから転送されたデータを格納する複数のネットワーク送信バッファと、他のノードから受信した集計データを格納する複数のネットワーク受信バッファと、ネットワーク受信バッファから転送されたデータを格納する複数のGPU送信バッファを備える。GPU(11-n-1,11-n-2)は、FPGA(12-n)にデータをDMA転送する。GPU送信バッファに格納されたデータは、GPU(11-n-1,11-n-2)にDMA転送される。

Description

分散深層学習システム
 本発明は、ニューラルネットワークを用いた機械学習である深層学習を複数のノードで分散協調して実行する分散深層学習システムに関するものである。
 深層学習では、順伝搬、逆伝搬を交互に行うことで入力データに適合したモデルを学習する。この順伝搬、逆伝搬を効率的に行うために、近年ではGPU(Graphics Processing Unit)などのアクセラレータを用いる。近年では、入力データが膨大に存在し、1台の計算機で処理した場合にストレージ、I/O(Input/Output)のボトルネックが発生するため、複数台の計算機にデータを分散させて処理を行うデータ並列分散深層学習が提案されている(非特許文献1参照)。
 データ並列分散深層学習では、計算機毎に異なる順伝搬、逆伝搬を行い、その結果得られた逆伝搬後の重みデータを通信を用いて共有する。この共有は、Allreduceと呼ばれる集団通信処理である。Allreduceでは、計算機毎に計算した重みデータを合計(Reduce)し、分配(Broadcast)を行う。Allreduceは、データ並列分散深層学習において重要な役割を持つ反面、ボトルネックになることが知られている。
 図28は従来の分散深層学習システムの構成を示すブロック図である。分散深層学習システムは、N個(Nは2以上の整数で、ここではN=4)のノード100-n(n=1,・・・,N)と、N個のノード100-nを互いに接続するネットワーク200とを備えている。
 親ノード100-1は、CPU(Central Processing Unit)101-1と、GPU102-1と、FPGA103-1とを備えている。
 子ノード100-k(k=2,・・・,N)は、CPU101-kと、GPU102-k-1と、FPGA103-kとを備えている。
 図29は親ノード100-1のFPGA103-1の機能ブロック図である。FPGA103-1は、GPU受信バッファ120と、GPU送信バッファ121と、ネットワーク送信バッファ122,123と、ネットワーク受信バッファ124,125と、送信部126と、送信部128と、受信部129として機能する。
 図30は子ノード100-k(k=2,・・・,N)のFPGA103-kの機能ブロック図である。FPGA103-kは、GPU受信バッファ120と、GPU送信バッファ121と、ネットワーク送信バッファ122,123と、ネットワーク受信バッファ124,125と、送信部126と、受信部127と、送信部128と、受信部129として機能する。
 以下、Allreduce処理について説明する。各ノード100-nのGPU102-nは、学習対象のモデルの重みに対する勾配を計算して、勾配を重み別に合算して分散データDを計算する。各ノード100-nのGPU102-nは、分散データDを、ノード100-nのFPGA103-nのGPU受信バッファ120にDMA(Direct Memory Access)転送する。GPU受信バッファ120に格納されているデータはネットワーク送信バッファ122,123のうち空いている方に転送される。
 各ノード100-nのFPGA103-nでは、ネットワーク送信バッファ122または123にデータが格納され、かつFPGA103-nのネットワーク受信バッファ124,125のうちどちらかが空であれば、チェックフラグがセットされる。
 親ノード100-1のFPGA103-1の送信部126は、自ノードを含む全てのノード100-nでチェックフラグがセットされている場合、FPGA103-1のネットワーク送信バッファ122または123に格納されている分散データDを取り出し、取り出したデータを中間集計データRt[1]として、通信路201を介して次の番号のノード100-2に送信する。
 子ノード100-k(k=2,・・・,N)のFPGA103-kの受信部127は、ノード100-(k-1)から通信路201を介して中間集計データRt[k-1]を受信する。
 子ノード100-kのFPGA103-kの加算部131は、FPGA103-kのネットワーク送信バッファ122または123に格納されている分散データDを取り出す。そして、加算部131は、取り出した分散データDと通信路201から受信した中間集計データRt[k-1]との和を求めることにより、中間集計データRt[k]を生成する。
 子ノード100-kのFPGA103-kの送信部126は、FPGA103-kの加算部131によって生成された中間集計データRt[k]を、通信路201を介して次の番号のノード100-k+(k+=k+1、ただしk=Nの場合はk+=1)に送信する。
 親ノード100-1のFPGA103-1の受信部129は、ノード100-Nから通信路201を介して中間集計データRt[N]を受信する。
 親ノード100-1のFPGA103-1の送信部128は、受信した中間集計データRt[N]を、集計データRとして、通信路201を介して次の番号のノード100-2に送信する。
 また、親ノード100-1のFPGA103-1の受信部129は、ノード100-Nから通信路201を介して受信した集計データRを、FPGA103-1のネットワーク受信バッファ124,125のうち空いている方に転送する。ネットワーク受信バッファ124または125に格納されたデータは、FPGA103-1のGPU送信バッファ121に転送される。GPU送信バッファ121に格納されたデータは、GPU102-1にDMA転送される。
 子ノード100-k(k=2,・・・,N)のFPGA103-kの受信部129は、ノード100-(k-1)から通信路201を介して集計データRを受信する。
 子ノード100-kのFPGA103-kの送信部128は、受信した集計データRを、通信路201を介して次の番号のノード100-k+(k+=n+1、ただしk=Nの場合はn+=1)に送信する。
 また、子ノード100-kのFPGA103-kの受信部129は、ノード100-(k-1)から通信路201を介して受信した集計データRを、FPGA103-kのネットワーク受信バッファ124,125のうち空いている方に転送する。ネットワーク受信バッファ124または125に格納されたデータは、FPGA103-kのGPU送信バッファ121に転送される。GPU送信バッファ121に格納されたデータは、GPU102-kにDMA転送される。
 以上のAllreduce処理において、DMA転送におけるファイルディスクリプタは1対1で指定する必要がある。このため、図28に示した従来の分散深層学習システムでは、複数のGPUでFPGAを用いたAllreduce処理を行うには時間をずらしてファイルディスクリプタを指定してDMA転送を実行する必要があり、通信のオーバヘッドが大きいという課題があった。
Kenji Tanaka,et al.,"Research Poster:(RP04) Distributed Deep Learning with FPGA Ring Allreduce",ISC 2019,2019,<https://2019.isc-program.com/presentation/?id=post120&sess=sess182>
 本発明は、上記課題を解決するためになされたもので、Allreduce処理のオーバヘッドを削減することができる分散深層学習システムを提供することを目的とする。
 本発明の分散深層学習システム(第1の実施例~第5の実施例)は、ネットワークを介して互いに接続された複数のノードを備え、各ノードは、学習対象のモデルの重み毎の分散データを生成するように構成された複数のGPUと、前記GPUからの前記分散データを格納するように構成された複数の第1の受信バッファと、前記第1の受信バッファから転送された前記分散データを格納するように構成された複数の第1の送信バッファと、他のノードから受信した集計データを格納するように構成された複数の第2の受信バッファと、前記第2の受信バッファから転送された前記集計データを格納するように構成された第2の送信バッファと、前記第1の送信バッファにデータが格納され、前記第2の受信バッファに空きがあるときに、チェックフラグをセットするように構成された監視部と、前記複数のノードのうち1番目のノードとして機能する場合に自ノードを含む全てのノードで前記チェックフラグがセットされたときに、前記第1の送信バッファに格納された前記分散データを第1の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、更新後の第1の集計データを次の番号のノードに送信するように構成された第1の送信部と、前記複数のノードのうち1番目を除くノードとして機能する場合に、他のノードから第1の集計データを受信するように構成された第1の受信部と、前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第1の送信バッファに格納された分散データと前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成するように構成された加算部と、前記複数のノードのうち1番目のノードとして機能する場合に、前記更新後の第1の集計データを受信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、第2の集計データを受信するように構成された第2の受信部と、前記複数のノードのうち1番目のノードとして機能する場合に、前記第2の受信部が受信した第1の集計データを第2の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第2の受信部が受信した第2の集計データを次の番号のノードに送信するように構成された第2の送信部と、前記第1の受信バッファに格納された分散データを前記第1の送信バッファに転送し、前記第2の送信バッファに格納された集計データを前記複数のGPUにDMA転送するように構成された第1の転送部と、前記第2の受信バッファに格納された集計データを前記第2の送信バッファに転送するように構成された第2の転送部とを備え、前記複数のGPUは、前記分散データを前記複数の第1の受信バッファにDMA転送することを特徴とするものである。
 また、本発明の分散深層学習システムの1構成例(第2の実施例)は、前記ネットワークに複数の通信路が設定され、各ノードは、前記複数のGPUと、前記通信路と同数の前記第1の受信バッファと、1つの前記通信路あたり複数設けられた前記第1の送信バッファと、1つの前記通信路あたり複数設けられた前記第2の受信バッファと、前記通信路と同数の前記第2の送信バッファと、前記監視部と、前記第1、第2の送信部と、前記第1、第2の受信部と、前記加算部と、前記第1の転送部と、前記第2の転送部とを備え、各GPUは、それぞれ対応する前記第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、前記第3の受信部が受信した第2の集計データを他のGPUに送信するように構成された第4の送信部と、他のGPUから送信された第2の集計データを受信するように構成された第4の受信部と、前記第3の受信部が受信した第2の集計データと前記第4の受信部が受信した第2の集計データとの和を重み毎に求めることにより、第3の集計データを生成するように構成された集計処理部と、前記第3の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、1つの通信路に対応する前記第2の送信バッファに格納された第2の集計データをこの通信路に対応するGPUにDMA転送し、前記第2の転送部は、1つの通信路に対応する第2の受信バッファに格納された第2の集計データをこの通信路に対応する前記第2の送信バッファに転送し、前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで同一の通信路に対応する前記チェックフラグがセットされ、少なくとも1つのノードで別の通信路に対応するチェックフラグがセットされていないときに、前記同一の通信路に対応する前記第1の送信バッファに格納された分散データを第1の集計データとして、前記同一の通信路を介して次の番号のノードに送信し、前記加算部は、1つの通信路に対応する前記第1の送信バッファに格納された分散データとこの通信路から前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とするものである。
 また、本発明の分散深層学習システムの1構成例(第3の実施例)において、前記ネットワークに複数の通信路が設定され、各ノードは、前記複数のGPUと、前記通信路と同数の前記第1の受信バッファと、1つの前記通信路あたり複数設けられた前記第1の送信バッファと、1つの前記通信路あたり複数設けられた前記第2の受信バッファと、前記通信路と同数の前記第2の送信バッファと、前記監視部と、前記第1、第2の送信部と、前記第1、第2の受信部と、前記加算部と、前記第1の転送部と、前記第2の転送部とを備え、各GPUは、前記複数の第1の受信バッファのいずれかに前記分散データをDMA転送するように構成された第3の送信部と、前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、前記第3の受信部が受信した第2の集計データを他のGPUに送信するように構成された第4の送信部と、他のGPUから送信された第2の集計データを受信するように構成された第4の受信部と、前記第3の受信部が受信した第2の集計データと前記第4の受信部が受信した第2の集計データとの和を重み毎に求めることにより、第3の集計データを生成するように構成された集計処理部と、前記第3の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、1つの通信路に対応する前記第2の送信バッファに格納された第2の集計データをこの第2の集計データに対応するGPUにDMA転送し、前記第2の転送部は、1つの通信路に対応する第2の受信バッファに格納された第2の集計データをこの通信路に対応する前記第2の送信バッファに転送し、前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで同一の通信路に対応する前記チェックフラグがセットされ、少なくとも1つのノードで別の通信路に対応するチェックフラグがセットされていないときに、前記同一の通信路に対応する前記第1の送信バッファに格納された前記分散データを第1の集計データとして、前記同一の通信路を介して次の番号のノードに送信し、前記加算部は、前記第1の受信部が他のノードから受信した第1の集計データの生成元のGPUと同じ組のGPUによって生成された分散データが前記第1の送信バッファに格納されている場合に、この分散データと前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とするものである。
 また、本発明の分散深層学習システムの1構成例(第4の実施例)において、前記ネットワークに複数の通信路が設定され、各ノードは、前記複数のGPUと、前記通信路と同数の前記第1の受信バッファと、1つの前記通信路あたり複数設けられた前記第1の送信バッファと、1つの前記通信路あたり複数設けられた前記第2の受信バッファと、前記通信路と同数の前記第2の送信バッファと、前記監視部と、前記第1、第2の送信部と、前記第1、第2の受信部と、前記加算部と、前記第1の転送部と、前記第2の転送部とを備え、各GPUは、前記複数の第1の受信バッファのうちビジーでない第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、前記第3の受信部が受信した第2の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、1つの通信路に対応する前記第2の送信バッファに格納された第2の集計データをこの通信路に対応するGPUにDMA転送し、前記第2の転送部は、1つの通信路に対応する第2の受信バッファに格納された第2の集計データをこの通信路に対応する前記第2の送信バッファに転送し、前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで全てのチェックフラグがセットされているときに、前記複数の第1の送信バッファに格納された分散データをそれぞれ第1の集計データとして、格納元の第1の送信バッファに対応する通信路を介して次の番号のノードに送信し、前記加算部は、前記複数の通信路に対応する前記複数の第1の送信バッファに格納された分散データと前記複数の通信路から前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とするものである。
 また、本発明の分散深層学習システムの1構成例(第5の実施例)において、前記ネットワークに複数の通信路が設定され、各ノードは、前記複数のGPUと、前記通信路と同数の前記第1の受信バッファと、1つの前記通信路あたり複数設けられた前記第1の送信バッファと、前記複数の通信路に共通に設けられた前記複数の第2の受信バッファと、前記複数の通信路に共通に設けられた前記第2の送信バッファと、前記監視部と、前記第1、第2の送信部と、前記第1、第2の受信部と、前記加算部と、前記第1の転送部と、前記第2の転送部とを備え、各GPUは、前記複数の第1の受信バッファのうちビジーでない第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、前記第3の受信部が受信した第2の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、前記第2の送信バッファに格納された第2の集計データを前記複数のGPUにDMA転送し、前記第2の転送部は、前記複数の第2の受信バッファのいずれかに格納された第2の集計データを前記第2の送信バッファに転送し、前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで全てのチェックフラグがセットされているときに、前記複数の第1の送信バッファに格納された分散データをそれぞれ第1の集計データとして、格納元の第1の送信バッファに対応する通信路を介して次の番号のノードに送信し、前記加算部は、前記複数の通信路に対応する前記複数の第1の送信バッファに格納された分散データと前記複数の通信路から前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とするものである。
 また、本発明の分散深層学習システム(第6の実施例)は、ネットワークを介して互いに接続された複数のノードを備え、各ノードは、学習対象のモデルの重み毎の分散データを生成するように構成された複数のGPUと、前記GPUからの前記分散データを格納するように構成された複数の第1の受信バッファと、前記複数の第1の受信バッファから転送された複数の前記分散データの和を重み毎に求めて第1の集計データを生成するように構成された第1の加算部と、前記第1の集計データを格納するように構成された複数の第1の送信バッファと、他のノードから受信した集計データを格納するように構成された複数の第2の受信バッファと、前記第2の受信バッファから転送された前記集計データを格納するように構成された第2の送信バッファと、前記第1の送信バッファにデータが格納され、前記第2の受信バッファに空きがあるときに、チェックフラグをセットするように構成された監視部と、前記複数のノードのうち1番目のノードとして機能する場合に自ノードを含む全てのノードで前記チェックフラグがセットされたときに、前記第1の送信バッファに格納された第1の集計データを第2の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、更新後の第2の集計データを次の番号のノードに送信するように構成された第1の送信部と、前記複数のノードのうち1番目を除くノードとして機能する場合に、他のノードから第2の集計データを受信するように構成された第1の受信部と、前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第1の送信バッファに格納された第1の集計データと前記第1の受信部が受信した第2の集計データとの和を重み毎に求めて前記更新後の第2の集計データを生成するように構成された第2の加算部と、前記複数のノードのうち1番目のノードとして機能する場合に、前記更新後の第2の集計データを受信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、第3の集計データを受信するように構成された第2の受信部と、前記複数のノードのうち1番目のノードとして機能する場合に、前記第2の受信部が受信した第2の集計データを第3の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第2の受信部が受信した第3の集計データを次の番号のノードに送信するように構成された第2の送信部と、前記第1の受信バッファに格納された分散データを前記第1の加算部に転送し、前記第2の送信バッファに格納された第3の集計データを前記複数のGPUにDMA転送するように構成された第1の転送部と、前記第2の受信バッファに格納された第3の集計データを前記第2の送信バッファに転送するように構成された第2の転送部とを備え、前記複数のGPUは、前記分散データを前記複数の第1の受信バッファにDMA転送し、前記第3の集計データに基づいて前記モデルを更新することを特徴とすることを特徴とするものである。
 また、本発明の分散深層学習システムの1構成例(第6の実施例)において、前記ネットワークに1つの通信路が設定され、各ノードは、前記複数のGPUと、前記GPUと同数の前記第1の受信バッファと、前記複数の第1の受信バッファと、前記複数の第2の受信バッファと、前記通信路と同数の前記第2の送信バッファと、前記監視部と、前記第1、第2の送信部と、前記第1、第2の受信部と、前記加算部と、前記第1の転送部と、前記第2の転送部とを備え、各GPUは、前記複数の第1の受信バッファのうちビジーでない第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、前記第1の転送部によってDMA転送された第3の集計データを受信するように構成された第3の受信部と、前記第3の受信部が受信した第3の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、前記第2の転送部は、前記複数の第2の受信バッファのいずれかに格納された第3の集計データを前記第2の送信バッファに転送し、前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、前記第2の加算部は、前記複数の第1の送信バッファのいずれかに格納された第1の集計データと前記通信路から前記第1の受信部が受信した第2の集計データとの和を重み毎に求めて前記更新後の第2の集計データを生成することを特徴とするものである。
 本発明によれば、各ノードの各GPUのDMA待ち時間が減少するため、各GPUは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本発明では、従来技術よりも第1の送信バッファを増やすことで、ネットワークの帯域を有効活用することができる。その結果、本発明では、Allreduce処理のオーバヘッドを削減することができる。
図1は、本発明の第1の実施例に係る分散深層学習システムの構成を示すブロック図である。 図2は、本発明の第1の実施例に係るGPUの機能ブロック図である。 図3は、本発明の第1の実施例に係る親ノードのFPGAの機能ブロック図である。 図4は、本発明の第1の実施例に係る子ノードのFPGAの機能ブロック図である。 図5は、本発明の第1の実施例に係るノードの各GPUのサンプルデータ入力処理と勾配計算処理とGPU内集計処理とを説明するフローチャートである。 図6は、本発明の第1の実施例に係る親ノードのノード間Allreduce処理を説明するフローチャートである。 図7は、本発明の第1の実施例に係る子ノードのノード間Allreduce処理を説明するフローチャートである。 図8は、本発明の第1の実施例に係る各ノードのGPU間Allreduce処理と重み更新処理とを説明するフローチャートである。 図9は、本発明の第1の実施例に係る各ノードのGPU間Allreduce処理を説明するフローチャートである。 図10は、本発明の第3の実施例に係る分散深層学習システムの構成を示すブロック図である。 図11は、本発明の第3の実施例に係るGPUの機能ブロック図である。 図12は、本発明の第3の実施例に係る親ノードのFPGAの機能ブロック図である。 図13は、本発明の第3の実施例に係る子ノードのFPGAの機能ブロック図である。 図14は、本発明の第4の実施例に係る分散深層学習システムの構成を示すブロック図である。 図15は、本発明の第4の実施例に係るGPUの機能ブロック図である。 図16は、本発明の第4の実施例に係る親ノードのFPGAの機能ブロック図である。 図17は、本発明の第4の実施例に係る子ノードのFPGAの機能ブロック図である。 図18は、本発明の第4の実施例に係るノードの重み更新処理を説明するフローチャートである。 図19は、本発明の第5の実施例に係る分散深層学習システムの構成を示すブロック図である。 図20は、本発明の第5の実施例に係る親ノードのFPGAの機能ブロック図である。 図21は、本発明の第5の実施例に係る子ノードのFPGAの機能ブロック図である。 図22は、本発明の第6の実施例に係る分散深層学習システムの構成を示すブロック図である。 図23は、本発明の第6の実施例に係る親ノードのFPGAの機能ブロック図である。 図24は、本発明の第6の実施例に係る子ノードのFPGAの機能ブロック図である。 図25は、本発明の第6の実施例に係る親ノードのノード間Allreduce処理を説明するフローチャートである。 図26は、本発明の第6の実施例に係る子ノードのノード間Allreduce処理を説明するフローチャートである。 図27は、本発明の第1~第6の実施例に係るノードを実現するコンピュータの構成例を示すブロック図である。 図28は、従来の分散深層学習システムの構成を示すブロック図である。 図29は、従来の分散深層学習システムの親ノードのFPGAの機能ブロック図である。 図30は、従来の分散深層学習システムの子ノードのFPGAの機能ブロック図である。
[第1の実施例]
 以下、本発明の実施例について図面を参照して説明する。図1は本発明の第1の実施例に係る分散深層学習システムの構成を示すブロック図である。分散深層学習システムは、N個(Nは2以上の整数で、本実施例ではN=4)のノード1-n(n=1,・・・,N)と、N個のノード1-nを互いに接続するネットワーク2とを備えている。
 本実施例では、ノード1-1を親ノード、ノード1-2~1-4を子ノードとする。また、ネットワーク2には、2系統の通信路20-1,20-2が設定されているものとする。なお、本発明において、「ノード」とは、ネットワーク上に分散配置されているサーバ等の機器を意味する。
 親ノード1-1は、CPU10-1と、GPU11-1-1,11-1-2と、FPGA12-1とを備えている。
 子ノード1-k(k=2,・・・,N)は、CPU10-kと、GPU11-k-1,11-k-2と、FPGA12-kとを備えている。
 本実施例では、各ノードにGPUがJ個(Jは2以上の整数で、本実施例ではJ=2)ずつ設けられている。図2はGPU11-n-j(n=1,・・・,N,j=1,・・・,J)の機能ブロック図である。GPU11-n-jは、図示しないデータ収集ノードから学習用のサンプルデータを受け取るサンプル入力部110と、サンプルデータが入力されたときに、学習対象のモデル13-n(ニューラルネットワーク)の重みの各々について、モデル13-nの損失関数の勾配をサンプルデータ毎に計算する勾配計算処理部111と、サンプルデータ毎の勾配を集計した数値である分散データを重み毎に生成して保持する集計処理部112と、モデル13-nの重みを更新する重み更新処理部113と、送信部114(第3の送信部)と、受信部115(第3の受信部)と、送信部116(第4の送信部)と、受信部117(第4の受信部)と、集計処理部118として機能する。
 モデル13-n(ニューラルネットワーク)は、CPU10-nによってソフトウェア的に構築された数学モデルである。
 図3は親ノード1-1のFPGA12-1の機能ブロック図である。FPGA12-1は、GPU受信バッファ120-1,120-2(第1の受信バッファ)と、GPU送信バッファ121-1,121-2(第2の送信バッファ)と、ネットワーク送信バッファ122-1,122-2,123-1,123-2(第1の送信バッファ)と、ネットワーク受信バッファ124-1,124-2,125-1,125-2(第2の受信バッファ)と、送信部126(第1の送信部)と、送信部128(第2の送信部)と、受信部129(第2の受信部)と、監視部130と、転送部132(第1の転送部)と、転送部133(第2の転送部)として機能する。
 図4は子ノード1-k(k=2,・・・,N)のFPGA12-kの機能ブロック図である。FPGA12-kは、GPU受信バッファ120-1,120-2と、GPU送信バッファ121-1,121-2と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124-1,124-2,125-1,125-2と、送信部126と、受信部127(第1の受信部)と、送信部128と、受信部129と、監視部130と、加算部131と、転送部132と、転送部133として機能する。
 本実施例では、ネットワーク2に設定された通信路20-1,20-2の数だけ各ノード1-nのFPGA12-nにGPU受信バッファ120-1,120-2が設けられている。また、通信路20-1,20-2の数だけ各ノード1-nのFPGA12-nにGPU送信バッファ121-1,121-2とが設けられている。
 また、各ノード1-nのFPGA12-nに、通信路20-1に対応する2つのネットワーク送信バッファ122-1,123-1と、通信路20-1に対応する2つのネットワーク受信バッファ124-1,125-1とが設けられている。さらに、各ノード1-nのFPGA12-nに、通信路20-2に対応する2つのネットワーク送信バッファ122-2,123-2と、通信路20-2に対応する2つのネットワーク受信バッファ124-2,125-2とが設けられている。
 図5はノード1-nの各GPU11-n-j(n=1,・・・,N,j=1,・・・,J)のサンプルデータ入力処理と勾配計算処理とGPU内集計処理とを説明するフローチャートである。
 ノード1-nの各GPU11-n-jのサンプル入力部110は、図示しないデータ収集ノードから異なるS個(Sは2以上の整数)のサンプルデータx[n,s](s=1,・・・,S)をミニバッチ毎に入力する(図5ステップS100)。
 なお、本発明は、データ収集ノードによるサンプルデータの収集方法、および収集したサンプルデータをN×J個の集合に振り分けて各ノード1-nの各GPU11-n-jへ分配する方法に限定されるものではなく、これらの方法の如何を問わず適用が可能である。
 ノード1-nの各GPU11-n-jの勾配計算処理部111は、サンプルデータx[n,s]が入力されたとき、学習対象のモデル13-nのM個(Mは2以上の整数)の重みw[m](m=1,・・・,M)の各々について、モデル13-nの損失関数の勾配Gj[m,n,s]をサンプルデータx[n,s]毎に計算する(図5ステップS101)。
 モデル13-nの重みw[m]、モデル13-nの性能の悪さを示す指標である損失関数、および損失関数の勾配Gj[m,n,s]については周知の技術であるので、詳細な説明は省略する。
 続いて、ノード1-nの各GPU11-n-jの集計処理部112は、サンプルデータ毎の勾配G[m,n,s]を集計した数値である分散データDj[m,n]を、重みw[m]毎に生成して保持する(図5ステップS102)。分散データDj[m,n]の計算式は以下のとおりである。
Figure JPOXMLDOC01-appb-M000001
 なお、勾配計算処理部111による勾配計算処理と集計処理部112によるGPU内集計処理とは、サンプルデータ単位でパイプライン化する(あるサンプルデータに対して勾配計算処理を行うと同時にその一つ前のサンプルデータから得た勾配を集計するGPU内集計処理とを同時に実行する)ことができる。
 さらに、各ノード1-nは、分散データDj[m,n]を生成した後に、ノード間Allreduce処理を行う。
 図6は親ノード1-1のノード間Allreduce処理を説明するフローチャート、図7は子ノード1-k(k=2,・・・,N)のノード間Allreduce処理を説明するフローチャートである。
 親ノード1-1の各GPU11-1-jの送信部114は、GPU11-1-jの集計処理部112によって生成されたM個の分散データDj[m,1](m=1,・・・,M,j=1,・・・,J)を、親ノード1-1のFPGA12-1のGPU受信バッファ120-1とGPU受信バッファ120-2のうちどちらか一方にDMA(Direct Memory Access)転送する(図6ステップS200)。各GPU11-1-jは、それぞれ異なるGPU受信バッファ120-1,120-2にデータを非同期でDMA転送する。DMA転送が輻輳した場合には、後からのDMA転送をキューイングし、先のDMA転送が終了次第、DMA転送を開始する。
 親ノード1-1のFPGA12-1の転送部132は、FPGA12-1のネットワーク送信バッファ122-1,122-2,123-1,123-2を監視している。転送部132は、FPGA12-1のGPU受信バッファ120-1にデータが格納され、ネットワーク送信バッファ122-1,123-1のうちどちらかが空であれば、GPU受信バッファ120-1に格納されているデータをネットワーク送信バッファ122-1,123-1のうち空いている方に転送する(図6ステップS201)。また、FPGA12-1の転送部132は、FPGA12-1のGPU受信バッファ120-2にデータが格納され、ネットワーク送信バッファ122-2,123-2のうちどちらかが空であれば、GPU受信バッファ120-2に格納されているデータをネットワーク送信バッファ122-2,123-2のうち空いている方に転送する(ステップS201)。
 同様に、子ノード1-kの各GPU11-k-jの送信部114は、GPU11-k-jの集計処理部112によって生成されたM個の分散データDj[m,k](m=1,・・・,M,j=1,・・・,J)を、子ノード1-kのFPGA12-kのGPU受信バッファ120-1とGPU受信バッファ120-2のどちらか一方にDMA転送する(図7ステップS300)。
 本実施例では、ノード1-nの各GPU11-n-1の送信部114が分散データD1[m,n]をFPGA12-nのGPU受信バッファ120-1に転送し、ノード1-nの各GPU11-n-2の送信部114が分散データD2[m,n]をFPGA12-nのGPU受信バッファ120-2に転送するものとして説明する。
 子ノード1-kのFPGA12-kの転送部132は、FPGA12-kのGPU受信バッファ120-1にデータが格納され、ネットワーク送信バッファ122-1,123-1のうちどちらかが空であれば、GPU受信バッファ120-1に格納されているデータをネットワーク送信バッファ122-1,123-1のうち空いている方に転送する(図7ステップS301)。また、FPGA12-kの転送部132は、FPGA12-kのGPU受信バッファ120-2にデータが格納され、ネットワーク送信バッファ122-2,123-2のうちどちらかが空であれば、GPU受信バッファ120-2に格納されているデータをネットワーク送信バッファ122-2,123-2のうち空いている方に転送する(ステップS301)。
 親ノード1-1のFPGA12-1の監視部130は、FPGA12-1のネットワーク送信バッファ122-1または123-1にデータが格納され、かつFPGA12-1のネットワーク受信バッファ124-1,125-1のうちどちらかが空であれば(図6ステップS202においてYES)、通信路20-1に対応するチェックフラグF1をセットする(図6ステップS203)。また、FPGA12-1の監視部130は、FPGA12-1のネットワーク送信バッファ122-2または123-2にデータが格納され、かつFPGA12-1のネットワーク受信バッファ124-2,125-2のうちどちらかが空であれば(ステップS202においてYES)、通信路20-2に対応するチェックフラグF2をセットする(ステップS203)。
 同様に、子ノード1-kのFPGA12-kの監視部130は、FPGA12-kのネットワーク送信バッファ122-1または123-1にデータが格納され、かつFPGA12-kのネットワーク受信バッファ124-1,125-1のうちどちらかが空であれば(図7ステップS302においてYES)、通信路20-1に対応するチェックフラグF1をセットする(図7ステップS303)。また、FPGA12-kの監視部130は、FPGA12-kのネットワーク送信バッファ122-2または123-2にデータが格納され、かつFPGA12-kのネットワーク受信バッファ124-2,125-2のうちどちらかが空であれば(ステップS302においてYES)、通信路20-2に対応するチェックフラグF2をセットする(ステップS303)。
 親ノード1-1のFPGA12-1の監視部130は、各子ノード1-kのFPGA12-kの監視部130で管理されているチェックフラグを監視しており、自ノードを含む全てのノード1-nでチェックフラグF1がセットされている場合(図6ステップS204においてYES)、FPGA12-1の送信部126に対してデータ送信を指示する。FPGA12-1の送信部126は、FPGA12-1のネットワーク送信バッファ122-1または123-1に格納されている分散データD1[m,1]を取り出し、取り出したデータを中間集計データRt1[m,1]として、通信路20-1を介して次の番号のノード1-2に送信する(図6ステップS205)。このときの中間集計データRt1[m,1]は、分散データD1[m,1]と同じである。
 Rt1[m,1]=D1[m,1]          ・・・(2)
 また、親ノード1-1のFPGA12-1の監視部130は、自ノードを含む全てのノード1-nでチェックフラグF2がセットされている場合(ステップS204においてYES)、FPGA12-1の送信部126に対してデータ送信を指示する。FPGA12-1の送信部126は、FPGA12-1のネットワーク送信バッファ122-2または123-2に格納されている分散データD2[m,1]を取り出し、取り出したデータを中間集計データRt2[m,1]として、通信路20-2を介して次の番号のノード1-2に送信する(ステップS205)。
 次に、複数の子ノード1-k(k=2,・・・,N)のうち、N番目を除く中間のノード1-i(i=2,・・・,N-1)のFPGA12-iの受信部127は、ノード1-(i-1)から通信路20-1を介して中間集計データRt1[m,i-1](m=1,・・・,M)を受信する(図7ステップS304)。
 子ノード1-i(i=2,・・・,N-1)のFPGA12-iの加算部131は、FPGA12-iのネットワーク送信バッファ122-1または123-1に格納されている分散データD1[m,i]を取り出す。そして、加算部131は、取り出した分散データD1[m,i]と通信路20-1から受信した中間集計データRt1[m,i-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt1[m,i]を生成する(図7ステップS305)。すなわち、中間集計データRt1[m,i]は、M個の数値から構成される。中間集計データRt1[m,i]の計算式は以下のとおりである。
 Rt1[m,i]=Rt1[m,i-1]+D1[m,i]・・・(3)
 そして、子ノード1-iのFPGA12-iの送信部126は、通信路20-1からのデータ受信に応じてFPGA12-iの加算部131によって生成された中間集計データRt1[m,i]を、通信路20-1を介して次の番号のノード1-(i+1)に送信する(図7ステップS306)。
 同様に、子ノード1-iのFPGA12-iの受信部127は、ノード1-(i-1)から通信路20-2を介して中間集計データRt2[m,i-1]を受信する(ステップS304)。子ノード1-iのFPGA12-iの加算部131は、FPGA12-iのネットワーク送信バッファ122-2または123-2に格納されている分散データD2[m,i]を取り出す。そして、加算部131は、取り出した分散データD2[m,i]と通信路20-2から受信した中間集計データRt2[m,i-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt2[m,i]を生成する(ステップS305)。
 そして、子ノード1-iのFPGA12-iの送信部126は、通信路20-2からのデータ受信に応じてFPGA12-iの加算部131によって生成された中間集計データRt2[m,i]を、通信路20-2を介して次の番号のノード1-(i+1)に送信する(ステップS306)。
 一方、子ノード1-NのFPGA12-Nの受信部127は、ノード1-(N-1)から通信路20-1を介して中間集計データRt1[m,N-1]を受信する(ステップS304)。
 子ノード1-NのFPGA12-Nの加算部131は、FPGA12-Nのネットワーク送信バッファ122-1または123-1に格納されている分散データD1[m,N]を取り出す。そして、加算部131は、取り出した分散データD1[m,N]と通信路20-1から受信した中間集計データRt1[m,N-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt1[m,N]を生成する(ステップS305)。すなわち、中間集計データRt1[m,N]は、M個の数値から構成される。中間集計データRt1[m,N]の計算式は以下のとおりである。
 Rt1[m,N]=Rt1[m,N-1]+D1[m,N]・・・(4)
 そして、子ノード1-NのFPGA12-Nの送信部126は、通信路20-1からのデータ受信に応じてFPGA12-Nの加算部131によって生成された中間集計データRt1[m,N]を、通信路20-1を介して親ノード1-1に送信する(ステップS306)。
 このように、式(2)、式(3)、式(4)により計算された、M個の数値から構成される中間集計データRt1[m,N]は、各ノード1-nで生成されたM個の数値から構成される分散データD1[m,n]に基づいて計算される。中間集計データRt1[m,N]の値は以下の式により表すことができる。
Figure JPOXMLDOC01-appb-M000002
 同様に、子ノード1-NのFPGA12-Nの受信部127は、ノード1-(N-1)から通信路20-2を介して中間集計データRt2[m,N-1]を受信する(ステップS304)。子ノード1-NのFPGA12-Nの加算部131は、FPGA12-Nのネットワーク送信バッファ122-2または123-2に格納されている分散データD2[m,N]を取り出す。そして、加算部131は、取り出した分散データD2[m,N]と通信路20-2から受信した中間集計データRt2[m,N-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt2[m,N]を生成する(ステップS305)。
 そして、子ノード1-NのFPGA12-Nの送信部126は、通信路20-2からのデータ受信に応じてFPGA12-Nの加算部131によって生成された中間集計データRt2[m,N]を、通信路20-2を介して親ノード1-1に送信する(ステップS306)。
 次に、親ノード1-1のFPGA12-1の受信部129は、ノード1-Nから通信路20-1を介して中間集計データRt1[m,N]を受信する(図6ステップS206)。
 親ノード1-1のFPGA12-1の送信部128は、受信した中間集計データRt1[m,N]を、集計データR1[m]として、通信路20-1を介して次の番号のノード1-2に送信する(図6ステップS207)。集計データR1[m]は、中間集計データRt1[m,N]と同じである。
 同様に、親ノード1-1のFPGA12-1の送信部128は、受信部129がノード1-Nから通信路20-2を介して中間集計データRt2[m,N]を受信した場合、受信した中間集計データRt2[m,N]を、集計データR2[m]として、通信路20-2を介して次の番号のノード1-2に送信する(ステップS207)。
 また、親ノード1-1のFPGA12-1の受信部129は、ノード1-Nから通信路20-1を介して受信した集計データR1[m](中間集計データRt1[m,N])を、FPGA12-1のネットワーク受信バッファ124-1,125-1のうち空いている方に転送する(図6ステップS208)。同様に、親ノード1-1のFPGA12-1の受信部129は、ノード1-Nから通信路20-2を介して受信した集計データR2[m]を、FPGA12-1のネットワーク受信バッファ124-2,125-2のうち空いている方に転送する(ステップS208)。
 親ノード1-1のFPGA12-1の転送部133は、FPGA12-1のネットワーク受信バッファ124-1,125-1のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12-1のGPU送信バッファ121-1に転送する(図6ステップS209)。同様に、親ノード1-1のFPGA12-1の転送部133は、FPGA12-1のネットワーク受信バッファ124-2,125-2のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12-1のGPU送信バッファ121-2に転送する(ステップS209)。
 親ノード1-1のFPGA12-1の転送部132は、FPGA12-1のGPU送信バッファ121-1に格納されたデータをGPU11-1-1にDMA転送する(図6ステップS210)。同様に、親ノード1-1のFPGA12-1の転送部132は、FPGA12-1のGPU送信バッファ121-2に格納されたデータをGPU11-1-2にDMA転送する(ステップS210)。
 以上で、ノード1-Nから通信路20-1,20-2を介して受信した集計データRj[m]がGPU11-1-1,11-1-2に転送される。
 一方、子ノード1-k(k=2,・・・,N)のFPGA12-kの受信部129は、ノード1-(k-1)から通信路20-1を介して集計データR1[m]を受信する(図7ステップS307)。
 子ノード1-kのFPGA12-kの送信部128は、受信した集計データR1[m]を、通信路20-1を介して次の番号のノード1-k+(k+=k+1、ただしk=Nの場合はk+=1)に送信する(図7ステップS308)。
 同様に、子ノード1-kのFPGA12-kの送信部128は、受信部129がノード1-(k-1)から通信路20-2を介して集計データR2[m]を受信した場合、受信した集計データR2[m]を、通信路20-2を介して次の番号のノード1-k+に送信する(ステップS308)。
 また、子ノード1-kのFPGA12-kの受信部129は、ノード1-(k-1)から通信路20-1を介して受信した集計データR1[m]を、FPGA12-kのネットワーク受信バッファ124-1,125-1のうち空いている方に転送する(図7ステップS309)。同様に、子ノード1-kのFPGA12-kの受信部129は、ノード1-(k-1)から通信路20-2を介して受信した集計データR2[m]を、FPGA12-kのネットワーク受信バッファ124-2,125-2のうち空いている方に転送する(ステップS309)。
 子ノード1-kのFPGA12-kの転送部133は、FPGA12-kのネットワーク受信バッファ124-1,125-1のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12-kのGPU送信バッファ121-1に転送する(図7ステップS310)。同様に、子ノード1-kのFPGA12-kの転送部133は、FPGA12-kのネットワーク受信バッファ124-2,125-2のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12-kのGPU送信バッファ121-2に転送する(ステップS310)。
 子ノード1-kのFPGA12-kの転送部132は、FPGA12-kのGPU送信バッファ121-1に格納されたデータをGPU11-k-1にDMA転送する(図7ステップS311)。同様に、子ノード1-kのFPGA12-kの転送部132は、FPGA12-kのGPU送信バッファ121-2に格納されたデータをGPU11-k-2にDMA転送する(ステップS311)。
 以上で、ノード1-(k-1)から通信路20-1,20-2を介して受信した集計データRj[m]がGPU11-k-1,11-k-2に転送される。
 次に、各ノード1-nのGPU11-n-jは、ノード内のGPU間Allreduce処理と重み更新処理とを行う。図8は各ノード1-nのGPU11-n-1のGPU間Allreduce処理と重み更新処理とを説明するフローチャート、図9は各ノード1-nのGPU11-n-p(p=2,・・・,J)のGPU間Allreduce処理を説明するフローチャートである。なお、ここでは各ノード1-nのGPU11-n-1が、そのノードの代表GPUとして重み更新処理を行うものとする。
 各ノード1-nのGPU11-n-1の受信部115は、FPGA12-nのGPU送信バッファ121-1に格納されていた集計データR1[m]を受信する(図8ステップS400)。
 各ノード1-nのGPU11-n-1の送信部116は、GPU11-n-1の受信部115が受信した集計データR1[m]を他のGPU11-n-2に送信する(図8ステップS401)。
 一方、各ノード1-nのGPU11-n-2の受信部115は、FPGA12-nのGPU送信バッファ121-2に格納されていた集計データR2[m]を受信する(図9ステップS500)。
 各ノード1-nのGPU11-n-2の送信部116は、GPU11-n-2の受信部115が受信した集計データR2[m]を他のGPU11-n-1に送信する(図9ステップS501)。
 各ノード1-nのGPU11-n-1の受信部117は、GPU11-n-2から送信された集計データR2[m]を受信する(図8ステップS402)。
 各ノード1-nのGPU11-n-2の受信部117は、GPU11-n-1から送信された集計データR1[m]を受信する(図9ステップS502)。
 次に、各ノード1-nのGPU11-n-1の集計処理部118は、GPU11-n-1の受信部115が受信した集計データR1[m]と受信部117が受信した集計データR2[m]との和を、対応する重みw[m]毎に求めることにより、集計データU[m]を生成する(図8ステップS403)。
 こうして、各ノード1-nのGPU11-n-1によって計算された分散データD1[m,n]を集計したデータR1[m]と、各ノード1-nのGPU11-n-2によって計算された分散データD2[m,n]を集計したデータR2[m]との和を、集計データU[m]として求めることができる。
 各ノード1-nのGPU11-n-1の重み更新処理部113は、集計データU[m]に基づいて、自ノード内のモデル13-nの重みw[m]を更新する重み更新処理を行う(図8ステップS404)。重み更新処理においては、集計データU[m]が示す、損失関数の勾配に基づいて損失関数が最小になるように重みw[m]を番号m毎に更新すればよい。重みw[m]の更新は周知の技術であるので、詳細な説明は省略する。
 重み更新処理の終了により、1回のミニバッチ学習が終了し、各ノード1-nは、更新された重みw[m]に基づき、次のミニバッチ学習の処理を継続して行う。すなわち、各ノード1-nは、次のミニバッチ学習用のサンプルデータを図示しないデータ収集ノードから受け取り、上記で説明したミニバッチ学習の処理を繰り返すことにより、自ノードのモデルの推論精度を向上させる。
 本実施例では、各ノード1-nの各GPU11-n-jのDMA待ち時間が減少するため、各GPU11-n-jは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本実施例では、DMA転送キューを用いることで、GPU-FPGAバスの帯域を有効活用できる。また、本実施例では、ネットワーク送信バッファが増えることで、ネットワークの帯域を有効活用できる。
[第2の実施例]
 次に、本発明の第2の実施例について説明する。本実施例においても、分散深層学習システムの構成および処理の流れは第1の実施例と同様であるので、図1~図9の符号を用いて説明する。
 第1の実施例では、ノード1-n(n=1,・・・,N)の各GPU11-n-j(j=1,・・・,J)は、生成した分散データDj[m,n]を、ノード1-nのFPGA12-nのGPU受信バッファ120-1とGPU受信バッファ120-2のうちどちらか一方にDMA転送するとしていた。
 これに対して、本実施例では、ノード1-nの各GPU11-1-1は、ノード1-nのFPGA12-nのGPU受信バッファ120-1とGPU送信バッファ121-1とを専有する。また、ノード1-nの各GPU11-1-2は、ノード1-nのFPGA12-nのGPU受信バッファ120-2とGPU送信バッファ121-2とを専有する。
 したがって、ノード1-nの各GPU11-n-1の送信部114は、GPU11-n-1の集計処理部112によって生成された分散データD1[m,n]を、ノード1-nのFPGA12-nのGPU受信バッファ120-1にDMA転送する(図6ステップS200)。同様に、ノード1-nの各GPU11-n-2の送信部114は、GPU11-n-2の集計処理部112によって生成された分散データD2[m,n]を、ノード1-nのFPGA12-nのGPU受信バッファ120-2にDMA転送する(ステップS200)。
 また、親ノード1-1のFPGA12-1の監視部130は、自ノードを含む全てのノード1-nでチェックフラグF1がセットされ、少なくとも1つのノードでチェックフラグF2がセットされていない場合(図6ステップS204においてYES)、FPGA12-1の送信部126に対してデータ送信を指示する。FPGA12-1の送信部126は、FPGA12-1のネットワーク送信バッファ122-1または123-1に格納されている分散データD1[m,1]を取り出し、取り出したデータを中間集計データRt1[m,1]として、通信路20-1を介して次の番号のノード1-2に送信する(図6ステップS205)。
 同様に、親ノード1-1のFPGA12-1の監視部130は、自ノードを含む全てのノード1-nでチェックフラグF2がセットされ、少なくとも1つのノードでチェックフラグF1がセットされていない場合(ステップS204においてYES)、FPGA12-1の送信部126に対してデータ送信を指示する。FPGA12-1の送信部126は、FPGA12-1のネットワーク送信バッファ122-2または123-2に格納されている分散データD2[m,1]を取り出し、取り出したデータを中間集計データRt2[m,1]として、通信路20-2を介して次の番号のノード1-2に送信する(ステップS205)。
 その他の処理は第1の実施例で説明したとおりである。こうして、本実施例では、各ノード1-nのGPU11-n-1によって計算された分散データD1[m,n]を集計して各ノード1-nのGPU11-n-1に配るノード間Allreduce処理と、各ノード1-nのGPU11-n-2によって計算された分散データD2[m,n]を集計して各ノード1-nのGPU11-n-2に配るノード間Allreduce処理とを実現することができる。
 本実施例では、各ノード1-nの各GPU11-n-jのDMA待ち時間が減少するため、各GPU11-n-jは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本実施例では、DMA転送キューを用いることで、GPU-FPGAバスの帯域を有効活用できる。また、本実施例では、ネットワーク送信バッファが増えることで、ネットワークの帯域を有効活用できる。また、本実施例では、ノード間Allreduce処理を各ノード1-nの1つのFPGAによって実行できるので、省電力化、省スペース化を実現することができる。
[第3の実施例]
 次に、本発明の第3の実施例について説明する。図10は本発明の第3の実施例に係る分散深層学習システムの構成を示すブロック図である。本実施例の分散深層学習システムは、N個のノード1a-n(n=1,・・・,N)と、N個のノード1a-nを互いに接続するネットワーク2とを備えている。
 親ノード1a-1は、CPU10-1と、GPU11a-1-1~11a-1-4と、FPGA12a-1とを備えている。
 子ノード1a-k(k=2,・・・,N)は、CPU10-kと、GPU11a-k-1~11a-k-4と、FPGA12a-kとを備えている。
 本実施例では、各ノード1a-nにGPUが4個(J=4)ずつ設けられている。図11はGPU11a-n-j(n=1,・・・,Nj=1,・・・,J)の機能ブロック図である。GPU11a-n-jは、サンプル入力部110と、勾配計算処理部111と、集計処理部112と、重み更新処理部113と、送信部114aと、受信部115と、送信部116と、受信部117と、集計処理部118として機能する。
 図12は親ノード1a-1のFPGA12a-1の機能ブロック図である。FPGA12a-1は、GPU受信バッファ120-1,120-2と、GPU送信バッファ121-1,121-2と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124-1,124-2,125-1,125-2と、送信部126と、送信部128と、受信部129と、監視部130と、転送部132aと、転送部133として機能する。
 図13は子ノード1a-k(k=2,・・・,N)のFPGA12a-kの機能ブロック図である。FPGA12a-kは、GPU受信バッファ120-1,120-2と、GPU送信バッファ121-1,121-2と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124-1,124-2,125-1,125-2と、送信部126と、受信部127と、送信部128と、受信部129と、監視部130と、加算部131aと、転送部132aと、転送部133として機能する。
 ノード1a-nの各GPU11a-n-j(n=1,・・・,N,j=1,・・・,J)のサンプルデータ入力処理と勾配計算処理とGPU内集計処理とは、第1の実施例で説明したとおりである。
 ノード1a-nのノード間Allreduce処理の流れは第1の実施例と同様であるので、図6、図7の符号を用いて説明する。
 第1の実施例と同様に、親ノード1a-1の各GPU11a-1-jの送信部114aは、GPU11a-1-jの集計処理部112によって生成された分散データDj[m,1]を、親ノード1a-1のFPGA12a-1のGPU受信バッファ120-1とGPU受信バッファ120-2のうちどちらか一方にDMA転送する(図6ステップS200)。DMA転送が輻輳した場合には、後からのDMA転送をキューイングし、先のDMA転送が終了次第、DMA転送を開始する。このとき、送信部114aは、分散データDj[m,1]を生成したGPU11a-1-jの識別子を、分散データDj[m,1]に付加する。図6のステップS201~S203の処理は第1の実施例で説明したとおりである。
 同様に、子ノード1a-kの各GPU11a-k-jの送信部114aは、GPU11a-k-jの集計処理部112によって生成された分散データDj[m,k]を、子ノード1a-kのFPGA12a-kのGPU受信バッファ120-1とGPU受信バッファ120-2のどちらか一方にDMA転送する(図7ステップS300)。このとき、送信部114aは、分散データDj[m,k]を生成したGPU11a-k-jの識別子を、分散データDj[m,k]に付加する。図7のステップS301~S303の処理は第1の実施例で説明したとおりである。
 本実施例では、ノード1a-nのGPU11a-n-1,GPU11a-n-3の送信部114aが分散データD1[m,n],D3[m,n]をFPGA12a-nのGPU受信バッファ120-1に転送し、ノード1a-nのGPU11a-n-2,GPU11a-n-4の送信部114aが分散データD2[m,n],D4[m,n]をFPGA12a-nのGPU受信バッファ120-2に転送するものとして説明する。
 親ノード1a-1のFPGA12a-1の監視部130は、自ノードを含む全てのノード1a-nでチェックフラグF1がセットされ、少なくとも1つのノードでチェックフラグF2がセットされていない場合(図6ステップS204においてYES)、FPGA12a-1の送信部126に対してデータ送信を指示する。FPGA12a-1の送信部126は、FPGA12a-1のネットワーク送信バッファ122-1または123-1に格納されている分散データD1[m,1]またはD3[m,1]を取り出し、取り出したデータを中間集計データRt1[m,1]またはRt3[m,1]として、通信路20-1を介して次の番号のノード1a-2に送信する(図6ステップS205)。
 また、親ノード1a-1のFPGA12a-1の監視部130は、自ノードを含む全てのノード1a-nでチェックフラグF2がセットされ、少なくとも1つのノードでチェックフラグF1がセットされていない場合(ステップS204においてYES)、FPGA12a-1の送信部126に対してデータ送信を指示する。FPGA12a-1の送信部126は、FPGA12a-1のネットワーク送信バッファ122-2または123-2に格納されている分散データD2[m,1]またはD4[m,1]を取り出し、取り出したデータを中間集計データRt2[m,1]またはRt4[m,1]として、通信路20-2を介して次の番号のノード1a-2に送信する(ステップS205)。
 次に、複数の子ノード1a-k(k=2,・・・,N)のうち、N番目を除く中間のノード1a-i(i=2,・・・,N-1)のFPGA12a-iの受信部127は、ノード1a-(i-1)から通信路20-1を介して中間集計データRt1[m,i-1]またはRt3[m,i-1]を受信する(図7ステップS304)。また、ノード1a-iのFPGA12a-iの受信部127は、ノード1a-(i-1)から通信路20-2を介して中間集計データRt2[m,i-1]またはRt4[m,i-1]を受信する(ステップS304)。
 子ノード1a-iのFPGA12a-iの加算部131aは、通信路20-1,20-2から受信した中間集計データRt1[m,i-1],Rt2[m,i-1],Rt3[m,i-1],Rt4[m,i-1]を一旦記憶する。そして、子ノード1a-iのFPGA12a-iの加算部131aは、受信した中間集計データRtj[m,i-1]の生成元のGPU11a-(i-1)-jと同じ組のGPU11a-i-jによって生成された分散データDj[m,i]がFPGA12-iのネットワーク送信バッファ122-1,123-1,122-2,123-2のいずれかに格納されている場合に、分散データDj[m,i]を取り出す。そして、加算部131aは、取り出した分散データDj[m,i]と通信路20-1または20-2から受信した中間集計データRtj[m,i-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRtj[m,i]を生成する(図7ステップS305)。
 なお、中間集計データRtj[m,i-1]の生成元のGPU11a-(i-1)-jは、中間集計データRtj[m,i-1]に付加されている識別子によって識別できる。同様に、分散データDj[m,i]の生成元のGPU11a-i-jは、分散データDj[m,i]に付加されている識別子によって識別できる。
 子ノード1a-iのFPGA12-iの送信部126は、FPGA12-iの加算部131aによって生成された中間集計データRt1[m,i]またはRt3[m,i]を、通信路20-1を介して次の番号のノード1a-(i+1)に送信する(図7ステップS306)。また、子ノード1a-iのFPGA12-iの送信部126は、FPGA12-iの加算部131aによって生成された中間集計データRt2[m,i]またはRt4[m,i]を、通信路20-2を介して次の番号のノード1a-(i+1)に送信する(ステップS306)。
 一方、子ノード1a-NのFPGA12a-Nの受信部127は、ノード1a-(N-1)から通信路20-1を介して中間集計データRt1[m,N-1]またはRt3[m,N-1]を受信する(図7ステップS304)。また、ノード1a-NのFPGA12a-Nの受信部127は、ノード1a-(N-1)から通信路20-2を介して中間集計データRt2[m,N-1]またはRt4[m,N-1]を受信する(ステップS304)。
 子ノード1a-NのFPGA12a-Nの加算部131aは、通信路20-1,20-2から受信した中間集計データRt1[m,N-1],Rt2[m,N-1],Rt3[m,N-1],Rt4[m,N-1]を一旦記憶する。そして、子ノード1a-NのFPGA12a-Nの加算部131aは、受信した中間集計データRtj[m,N-1]の生成元のGPU11a-(N-1)-jと同じ組のGPU11a-N-jによって生成された分散データDj[m,N]がFPGA12-Nのネットワーク送信バッファ122-1,123-1,122-2,123-2のいずれかに格納されている場合に、分散データDj[m,N]を取り出す。そして、加算部131aは、取り出した分散データDj[m,N]と通信路20-1または20-2から受信した中間集計データRtj[m,N-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRtj[m,N]を生成する(図7ステップS305)。
 子ノード1a-NのFPGA12-Nの送信部126は、FPGA12-Nの加算部131aによって生成された中間集計データRt1[m,N]またはRt3[m,N]を、通信路20-1を介して親ノード1a-1に送信する(図7ステップS306)。また、子ノード1a-NのFPGA12-Nの送信部126は、FPGA12-Nの加算部131aによって生成された中間集計データRt2[m,N]またはRt4[m,N]を、通信路20-2を介して親ノード1a-1に送信する(ステップS306)。
 次に、親ノード1a-1のFPGA12a-1の受信部129は、ノード1a-Nから通信路20-1または20-2を介して中間集計データRt1[m,N],Rt2[m,N],Rt3[m,N],Rt4[m,N]を受信する(図6ステップS206)。
 親ノード1a-1のFPGA12a-1の送信部128は、受信した中間集計データRt1[m,N]またはRt3[m,N]を、集計データR1[m]またはR3[m]として、通信路20-1を介して次の番号のノード1a-2に送信する(図6ステップS207)。また、親ノード1a-1のFPGA12a-1の送信部128は、受信した中間集計データRt2[m,N]またはRt4[m,N]を、集計データR2[m]またはR4[m]として、通信路20-2を介して次の番号のノード1a-2に送信する(ステップS207)。
 また、親ノード1a-1のFPGA12a-1の受信部129は、ノード1a-Nから通信路20-1または20-2を介して受信した集計データR1[m],R2[m],R3[m],R4[m]を、FPGA12a-1のネットワーク受信バッファ124-1,125-1,124-2,125-2のうち空いているバッファに転送する(図6ステップS208)。
 図6ステップS209の処理は第1の実施例で説明したとおりである。親ノード1a-1のFPGA12a-1の転送部132aは、FPGA12a-1のGPU送信バッファ121-1または12-2に集計データRj[m]が格納されている場合、この集計データRj[m]を対応するGPU11a-1-jにDMA転送する(図6ステップS210)。
 上記の説明から明らかなように、集計データRj[m]とGPU11a-1-jとの対応は、集計データRj[m]に付加されている識別子によって判定できる。
 以上で、ノード1a-Nから通信路20-1,20-2を介して受信した集計データRj[m]がGPU11a-1-jに転送される。
 一方、子ノード1a-k(k=2,・・・,N)のFPGA12a-kの受信部129は、ノード1a-(k-1)から通信路20-1または20-2を介して集計データR1[m],R2[m],R3[m],R4[m]を受信する(図7ステップS307)。
 子ノード1a-kのFPGA12a-kの送信部128は、受信した集計データR1[m]またはR3[m]を、通信路20-1を介して次の番号のノード1a-k+(k+=k+1、ただしk=Nの場合はk+=1)に送信する(図7ステップS308)。また、子ノード1a-kのFPGA12a-kの送信部128は、受信した集計データR2[m]またはR4[m]を、通信路20-2を介して次の番号のノード1a-k+に送信する(ステップS308)。
 また、子ノード1a-kのFPGA12a-kの受信部129は、ノード1a-(k-1)から通信路20-1または20-2を介して受信した集計データR1[m],R2[m],R3[m],R4[m]を、FPGA12a-kのネットワーク受信バッファ124-1,125-1,124-2,125-2のうち空いているバッファに転送する(図7ステップS309)。
 図7のステップS310の処理は第1の実施例で説明したとおりである。子ノード1a-kのFPGA12a-kの転送部132aは、FPGA12a-kのGPU送信バッファ121-1または12-2に集計データRj[m]が格納されている場合、この集計データRj[m]を対応するGPU11a-k-jにDMA転送する(図7ステップS311)。
 以上で、ノード1a-(k-1)から通信路20-1,20-2を介して受信した集計データRj[m]がGPU11a-k-jに転送される。
 次に、各ノード1a-nのGPU11a-n-jは、ノード内のGPU間Allreduce処理と重み更新処理とを行う。GPU間Allreduce処理と重み更新処理の流れは第1の実施例と同様であるので、図8、図9の符号を用いて説明する。
 各ノード1a-nのGPU11a-n-1の受信部115は、FPGA12a-nから集計データR1[m]を受信する(図8ステップS400)。
 各ノード1a-nのGPU11a-n-1の送信部116は、GPU11a-n-1の受信部115が受信した集計データR1[m]を他のGPU11a-n-p(p=2,・・・,J)に送信する(図8ステップS401)。
 一方、各ノード1a-nのGPU11a-n-p(p=2,・・・,J)の受信部115は、それぞれFPGA12a-nから集計データRp[m]を受信する(図9ステップS500)。
 各ノード1a-nのGPU11a-n-pの送信部116は、GPU11a-n-pの受信部115が受信した集計データRp[m]を他のGPU11a-n-q(qはJ以下の自然数で、p≠q)に送信する(図9ステップS501)。
 各ノード1a-nのGPU11a-n-1の受信部117は、GPU11a-n-pから送信された集計データRp[m]を受信する(図8ステップS402)。
 各ノード1a-nのGPU11a-n-pの受信部117は、GPU11a-n-qから送信された集計データRq[m]を受信する(図9ステップS502)。
 次に、各ノード1a-nのGPU11a-n-1の集計処理部118は、GPU11a-n-1の受信部115が受信した集計データR1[m]と受信部117が受信した集計データRp[m]との和を、対応する重みw[m]毎に求めることにより、集計データU[m]を生成する(図8ステップS403)。
 こうして、各ノード1a-nのGPU11a-n-1によって計算された分散データD1[m,n]を集計したデータR1[m]と、各ノード1a-nのGPU11a-n-2によって計算された分散データD2[m,n]を集計したデータR2[m]と、各ノード1a-nのGPU11a-n-3によって計算された分散データD3[m,n]を集計したデータR3[m]と、各ノード1a-nのGPU11a-n-4によって計算された分散データD4[m,n]を集計したデータR4[m]との和を、集計データU[m]として求めることができる。
 図8のステップS404の処理は第1の実施例で説明したとおりである。
 本実施例では、各ノード1a-nの各GPU11a-n-jのDMA待ち時間が減少するため、各GPU11a-n-jは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本実施例では、DMA転送キューを用いることで、GPU-FPGAバスの帯域を有効活用できる。また、本実施例では、ネットワーク送信バッファが増えることで、ネットワークの帯域を有効活用できる。また、本実施例では、各GPU11a-n-jを並列に動作させることで、ノード内の集約スループットを向上させることができる。本実施例では、各GPU11a-n-jが並列にAllreduceキューを作成するので、よりバス帯域、ネットワーク帯域を有効活用できる。また、本実施例では、ノード間Allreduce処理を各ノード1a-nの1つのFPGAによって実行できるので、省電力化、省スペース化を実現することができる。
 従来は集団通信において最も遅い処理であるAllreduce処理がノード内およびノード間で発生していた。これに対して、本実施例では、ノード内のAllreduce処理がGPUの並列数分だけ高速になり、ノード間のAllreduce処理についてもGPUの並列数分だけ高速になる。
[第4の実施例]
 次に、本発明の第4の実施例について説明する。図14は本発明の第4の実施例に係る分散深層学習システムの構成を示すブロック図である。本実施例の分散深層学習システムは、N個のノード1b-n(n=1,・・・,N)と、N個のノード1b-nを互いに接続するネットワーク2とを備えている。
 親ノード1b-1は、CPU10-1と、GPU11b-1-1,11b-1-2と、FPGA12b-1とを備えている。
 子ノード1b-k(k=2,・・・,N)は、CPU10-kと、GPU11b-k-1,11a-k-2と、FPGA12b-kとを備えている。
 本実施例では、各ノード1b-nにGPUが2個(J=2)ずつ設けられている。図15はGPU11b-n-j(n=1,・・・,Nj=1,・・・,J)の機能ブロック図である。GPU11b-n-jは、サンプル入力部110と、勾配計算処理部111と、集計処理部112と、重み更新処理部113と、送信部114bと、受信部115として機能する。
 図16は親ノード1b-1のFPGA12b-1の機能ブロック図である。FPGA12b-1は、GPU受信バッファ120-1,120-2と、GPU送信バッファ121-1,121-2と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124-1,124-2,125-1,125-2と、送信部126と、送信部128と、受信部129と、監視部130bと、転送部132bと、転送部133として機能する。
 図17は子ノード1b-k(k=2,・・・,N)のFPGA12b-kの機能ブロック図である。FPGA12b-kは、GPU受信バッファ120-1,120-2と、GPU送信バッファ121-1,121-2と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124-1,124-2,125-1,125-2と、送信部126と、受信部127と、送信部128と、受信部129と、監視部130bと、加算部131bと、転送部132bと、転送部133として機能する。
 ノード1b-nの各GPU11b-n-j(n=1,・・・,N,j=1,・・・,J)のサンプルデータ入力処理と勾配計算処理とGPU内集計処理とは、第1の実施例で説明したとおりである。
 ノード1b-nのノード間Allreduce処理の流れは第1の実施例と同様であるので、図6、図7の符号を用いて説明する。
 第1の実施例と同様に、親ノード1b-1の各GPU11b-1-jの送信部114bは、GPU11b-1-jの集計処理部112によって生成された分散データDj[m,1]を、親ノード1b-1のFPGA12b-1のGPU受信バッファ120-1とGPU受信バッファ120-2のうちどちらか一方にDMA転送する(図6ステップS200)。
 各GPU11b-1-jの送信部114bは、GPU受信バッファ120-1とGPU受信バッファ120-2のうち、現在ビジーではない方(別のGPUが使用していない方)を選択して分散データDj[m,1]をDMA転送する。
 図6のステップS201~S203の処理は第1の実施例で説明したとおりである。
 同様に、子ノード1b-kの各GPU11b-k-jの送信部114bは、GPU11b-k-jの集計処理部112によって生成された分散データDj[m,k]を、子ノード1b-kのFPGA12b-kのGPU受信バッファ120-1とGPU受信バッファ120-2のうち、現在ビジーではない方にDMA転送する(図7ステップS300)。
 本実施例では、ノード1b-nのGPU11b-n-1の送信部114bが分散データD1[m,n]をFPGA12b-nのGPU受信バッファ120-1に転送し、ノード1b-nのGPU11b-n-2の送信部114bが分散データD2[m,n]をFPGA12b-nのGPU受信バッファ120-2に転送するものとして説明する。
 図7のステップS301~S303の処理は第1の実施例で説明したとおりである。
 親ノード1b-1のFPGA12b-1の監視部130bは、自ノードを含む全てのノード1b-nでチェックフラグF1とチェックフラグF2とがセットされている場合(図6ステップS204においてYES)、FPGA12b-1の送信部126に対してデータ送信を指示する。FPGA12b-1の送信部126は、FPGA12b-1のネットワーク送信バッファ122-1または123-1に格納されている分散データD1[m,1]を取り出し、取り出したデータを中間集計データRt1[m,1]として、通信路20-1を介して次の番号のノード1b-2に送信する(図6ステップS205)。また、FPGA12b-1の送信部126は、FPGA12b-1のネットワーク送信バッファ122-2または123-2に格納されている分散データD2[m,1]を取り出し、取り出したデータを中間集計データRt2[m,1]として、通信路20-2を介して次の番号のノード1b-2に送信する(ステップS205)。
 次に、子ノード1b-2のFPGA12b-2の受信部127は、親ノード1b-1から通信路20-1を介して中間集計データRt1[m,1]を受信する(図7ステップS304)。また、子ノード1b-2のFPGA12b-2の受信部127は、親ノード1b-1から通信路20-2を介して中間集計データRt2[m,1]を受信する(ステップS304)。
 子ノード1b-2のFPGA12b-2の加算部131bは、通信路20-1,20-2から受信した中間集計データRt1[m,1],Rt2[m,1]を一旦記憶する。加算部131bは、GPU11b-2-1,11b-2-2によって生成された分散データD1[m,2],D2[m,2]をFPGA12b-2のネットワーク送信バッファ122-1,123-1,122-2,123-2のいずれかから取り出す。そして、加算部131bは、取り出した分散データD1[m,2],D2[m,2]と通信路20-1,20-2から受信した中間集計データRt1[m,1],Rt2[m,1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt[m,2]を生成する(図7ステップS305)。
 子ノード1b-2のFPGA12b-2の送信部126は、FPGA12b-2の加算部131bによって生成された中間集計データRt[m,2]を、通信路20-1,20-2を介して次の番号のノード1b-3に送信する(図7ステップS306)。
 子ノード1b-r(r=3,・・・,N)のFPGA12b-rの受信部127は、ノード1b-(r-1)から通信路20-1,20-2を介して中間集計データRt[m,r-1]を受信する(図7ステップS304)。
 子ノード1b-rのFPGA12b-rの加算部131bは、通信路20-1,20-2から受信した中間集計データRt[m,r-1]を一旦記憶する。加算部131bは、GPU11b-r-1,11b-r-2によって生成された分散データD1[m,2],D2[m,2]をFPGA12b-rのネットワーク送信バッファ122-1,123-1,122-2,123-2のいずれかから取り出す。そして、加算部131bは、取り出した分散データD1[m,2],D2[m,2]と通信路20-1,20-2から受信した中間集計データRt[m,r-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt[m,r]を生成する(図7ステップS305)。このとき、加算に用いる中間集計データRt[m,r-1]は、通信路20-1,20-2のうちどちらか一方のみからのデータを使用すればよい。
 子ノード1b-rのFPGA12b-rの送信部126は、FPGA12b-rの加算部131bによって生成された中間集計データRt[m,r]を、通信路20-1,20-2を介して次の番号のノード1b-r+(r+=r+1、ただしr=Nの場合はr+=1)に送信する(図7ステップS306)。
 次に、親ノード1b-1のFPGA12b-1の受信部129は、ノード1b-Nから通信路20-1,20-2を介して中間集計データRt[m,N]を受信する(図6ステップS206)。
 親ノード1b-1のFPGA12b-1の送信部128は、受信した中間集計データRt[m,N]を、集計データU[m]として、通信路20-1,20-2を介して次の番号のノード1b-2に送信する(図6ステップS207)。
 また、親ノード1b-1のFPGA12b-1の受信部129は、ノード1b-Nから通信路20-1,20-2を介して受信した集計データU[m]を、FPGA12b-1のネットワーク受信バッファ124-1,125-1のうち空いているバッファとネットワーク受信バッファ124-2,125-2のうち空いているバッファとに転送する(図6ステップS208)。このとき、受信部129は、通信路20-1,20-2のうちどちらか一方のみからの集計データU[m]を転送すればよい。
 図6ステップS209の処理は第1の実施例で説明したとおりである。親ノード1b-1のFPGA12b-1の転送部132bは、FPGA12b-1のGPU送信バッファ121-1に集計データU[m]が格納されている場合、この集計データU[m]をGPU11b-1-1にDMA転送する(図6ステップS210)。また、親ノード1b-1のFPGA12b-1の転送部132bは、FPGA12b-1のGPU送信バッファ121-2に集計データU[m]が格納されている場合、この集計データU[m]をGPU11b-1-2にDMA転送する(ステップS210)。
 以上で、ノード1b-Nから通信路20-1,20-2を介して受信した集計データU[m]がGPU11b-1-jに転送される。
 一方、子ノード1b-k(k=2,・・・,N)のFPGA12b-kの受信部129は、ノード1b-(k-1)から通信路20-1,20-2を介して集計データU[m]を受信する(図7ステップS307)。
 子ノード1b-kのFPGA12b-kの送信部128は、受信した集計データU[m]を、通信路20-1,20-2を介して次の番号のノード1b-k+(k+=k+1、ただしk=Nの場合はk+=1)に送信する(図7ステップS308)。
 また、子ノード1b-kのFPGA12b-kの受信部129は、ノード1b-(k-1)から通信路20-1,20-2を介して受信した集計データU[m]を、FPGA12b-kのネットワーク受信バッファ124-1,125-1のうち空いているバッファとネットワーク受信バッファ124-2,125-2のうち空いているバッファとに転送する(図7ステップS309)。
 図7のステップS310の処理は第1の実施例で説明したとおりである。子ノード1b-kのFPGA12b-kの転送部132bは、FPGA12b-kのGPU送信バッファ121-1に集計データU[m]が格納されている場合、この集計データU[m]をGPU11b-k-1にDMA転送する(図7ステップS311)。また、親ノード1b-kのFPGA12b-kの転送部132bは、FPGA12b-kのGPU送信バッファ121-2に集計データU[m]が格納されている場合、この集計データU[m]をGPU11b-k-2にDMA転送する(ステップS311)。
 以上で、ノード1b-(k-1)から通信路20-1,20-2を介して受信した集計データU[m]がGPU11b-k-jに転送される。
 次に、各ノード1b-nのGPU11b-n-jは、重み更新処理を行う。図18はノード1b-nのGPU11b-n-1の重み更新処理を説明するフローチャートである。なお、ここでは各ノード1b-nのGPU11b-n-1が、そのノードの代表GPUとして重み更新処理を行うものとする。
 各ノード1b-nのGPU11b-n-1の受信部115は、FPGA12b-nから集計データU[m]を受信する(図18ステップS600)。
 各ノード1b-nのGPU11b-n-1の重み更新処理部113は、集計データU[m]に基づいて、自ノード内のモデル13-nの重みw[m]を更新する重み更新処理を行う(図18ステップS601)。
 本実施例では、各ノード1b-nの各GPU11b-n-jのDMA待ち時間が減少するため、各GPU11b-n-jは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本実施例では、DMA転送キューを用いることで、GPU-FPGAバスの帯域を有効活用できる。また、本実施例では、ネットワーク送信バッファが増えることで、ネットワークの帯域を有効活用できる。また、本実施例では、ノード間Allreduce処理を各ノード1b-nの1つのFPGAによって実行できるので、省電力化、省スペース化を実現することができる。
 本実施例では、集団通信において最も遅い処理であるAllreduce処理における全ての集計処理を、FPGA12b-nのハードウェアで実行するため、GPU側の処理が軽くなり、かつ処理レイテンシも高速になる。各GPU11b-n-jは、ビジーではないGPU受信バッファを選択できるので、GPU受信バッファの開放待ちを時間を低減することができ、全体の処理時間を短くすることができる。
[第5の実施例]
 次に、本発明の第5の実施例について説明する。図19は本発明の第5の実施例に係る分散深層学習システムの構成を示すブロック図である。本実施例の分散深層学習システムは、N個のノード1c-n(n=1,・・・,N)と、N個のノード1c-nを互いに接続するネットワーク2とを備えている。
 親ノード1c-1は、CPU10-1と、GPU11c-1-1,11c-1-2と、FPGA12c-1とを備えている。
 子ノード1c-k(k=2,・・・,N)は、CPU10-kと、GPU11c-k-1,11a-k-2と、FPGA12c-kとを備えている。
 本実施例では、各ノード1c-nにGPUが2個(J=2)ずつ設けられている。GPU11c-n-jの構成は、第4の実施例のGPU11b-n-jと同様であるので、図15の符号を用いて説明する。
 図20は親ノード1c-1のFPGA12c-1の機能ブロック図である。FPGA12c-1は、GPU受信バッファ120-1,120-2と、GPU送信バッファ121と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124,125と、送信部126と、送信部128と、受信部129と、監視部130bと、転送部132cと、転送部133cとして機能する。
 図21は子ノード1c-k(k=2,・・・,N)のFPGA12c-kの機能ブロック図である。FPGA12c-kは、GPU受信バッファ120-1,120-2と、GPU送信バッファ121と、ネットワーク送信バッファ122-1,122-2,123-1,123-2と、ネットワーク受信バッファ124,125と、送信部126と、受信部127と、送信部128と、受信部129と、監視部130bと、加算部131bと、転送部132cと、転送部133cとして機能する。
 本実施例では、各ノード1c-nのFPGA12c-nに、通信路20-1,20-2と同数のGPU受信バッファ120-1,120-2と、通信路20-1,20-2に共通のGPU送信バッファ121とが設けられている。また、各ノード1c-nのFPGA12c-nに、通信路20-1に対応する2つのネットワーク送信バッファ122-1,123-1が設けられている。また、各ノード1c-nのFPGA12c-nに、通信路20-2に対応する2つのネットワーク送信バッファ122-2,123-2が設けられている。さらに、各ノード1c-nのFPGA12c-nに、通信路20-1,20-2に共通の2つのネットワーク受信バッファ124,125が設けられている。
 ノード1c-nの各GPU11c-n-j(n=1,・・・,N,j=1,・・・,J)のサンプルデータ入力処理と勾配計算処理とGPU内集計処理とは、第1の実施例で説明したとおりである。
 ノード1c-nのノード間Allreduce処理の流れは第1の実施例と同様であるので、図6、図7の符号を用いて説明する。
 親ノード1c-1の各GPU11c-1-jの送信部114bは、GPU11c-1-jの集計処理部112によって生成された分散データDj[m,1]を、親ノード1c-1のFPGA12c-1のGPU受信バッファ120-1とGPU受信バッファ120-2のうちどちらか一方にDMA転送する(図6ステップS200)。
 第4の実施例と同様に、各GPU11c-1-jの送信部114bは、GPU受信バッファ120-1とGPU受信バッファ120-2のうち、現在ビジーではない方(別のGPUが使用していない方)を選択して分散データDj[m,1]をDMA転送する。
 図6のステップS201~S207の処理は第4の実施例で説明したとおりである。
 子ノード1c-kの各GPU11c-k-jの送信部114bは、GPU11c-k-jの集計処理部112によって生成された分散データDj[m,k]を、子ノード1c-kのFPGA12c-kのGPU受信バッファ120-1とGPU受信バッファ120-2のうち、現在ビジーではない方にDMA転送する(図7ステップS300)。
 図7のステップS301~S308の処理は第4の実施例で説明したとおりである。
 親ノード1c-1のFPGA12c-1の受信部129は、ノード1c-Nから通信路20-1,20-2を介して受信した集計データU[m]を、FPGA12c-1のネットワーク受信バッファ124,125のうち空いている方に転送する(図6ステップS208)。このとき、受信部129は、通信路20-1,20-2のうちどちらか一方のみからの集計データU[m]を転送すればよい。
 親ノード1c-1のFPGA12c-1の転送部133cは、FPGA12c-1のネットワーク受信バッファ124,125のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12c-1のGPU送信バッファ121に転送する(図6ステップS209)。
 親ノード1c-1のFPGA12c-1の転送部132cは、FPGA12c-1のGPU送信バッファ121に格納されたデータをGPU11c-1-1,GPU11c-1-2にDMA転送する(図6ステップS210)。
 以上で、ノード1c-Nから通信路20-1,20-2を介して受信した集計データU[m]がGPU11c-1-1,11c-1-2にブロードキャスト転送される。
 子ノード1c-kのFPGA12c-kの受信部129は、ノード1c-(k-1)から通信路20-1,20-2を介して受信した集計データU[m]を、FPGA12c-kのネットワーク受信バッファ124,125のうち空いている方に転送する(図7ステップS309)。このとき、受信部129は、通信路20-1,20-2のうちどちらか一方のみからの集計データU[m]を転送すればよい。
 子ノード1c-kのFPGA12c-kの転送部133cは、FPGA12c-kのネットワーク受信バッファ124,125のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12c-kのGPU送信バッファ121に転送する(図7ステップS310)。
 子ノード1c-kのFPGA12c-kの転送部132cは、FPGA12c-kのGPU送信バッファ121に格納されたデータをGPU11c-k-1,GPU11c-k-2にDMA転送する(図7ステップS311)。
 以上で、ノード1c-(k-1)から通信路20-1,20-2を介して受信した集計データU[m]がGPU11c-k-1,11c-k-2にブロードキャスト転送される。
 各ノード1c-nのGPU11c-n-jの重み更新処理は、第4の実施例と同様である。
 本実施例では、各ノード1c-nの各GPU11c-n-jのDMA待ち時間が減少するため、各GPU11c-n-jは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本実施例では、DMA転送キューを用いることで、GPU-FPGAバスの帯域を有効活用できる。また、本実施例では、ネットワーク送信バッファが増えることで、ネットワークの帯域を有効活用できる。また、本実施例では、ノード間Allreduce処理を各ノード1c-nの1つのFPGAによって実行できるので、省電力化、省スペース化を実現することができる。また、本実施例では、第1~第4の実施例と比較してFPGA内のネットワーク受信バッファとGPU送信バッファの数を削減することができるので、回路面積を削減することができ、コストを削減することができる。
 本実施例では、集団通信において最も遅い処理であるAllreduce処理における全ての集計処理を、FPGA12c-nのハードウェアで実行するため、GPU側の処理が軽くなり、かつ処理レイテンシも高速になる。各GPU11c-n-jは、ビジーではないGPU受信バッファを選択できるので、GPU受信バッファの開放待ちを時間を低減することができ、全体の処理時間を短くすることができる。
[第6の実施例]
 次に、本発明の第6の実施例について説明する。図22は本発明の第6の実施例に係る分散深層学習システムの構成を示すブロック図である。本実施例の分散深層学習システムは、N個のノード1d-n(n=1,・・・,N)と、N個のノード1d-nを互いに接続するネットワーク2dとを備えている。ネットワーク2dには、1系統の通信路20が設定されている。
 親ノード1d-1は、CPU10-1と、GPU11d-1-1,11d-1-2と、FPGA12d-1とを備えている。
 子ノード1d-k(k=2,・・・,N)は、CPU10-kと、GPU11d-k-1,11a-k-2と、FPGA12d-kとを備えている。
 本実施例では、各ノード1d-nにGPUが2個(J=2)ずつ設けられている。GPU11d-n-jの構成は、第4の実施例のGPU11b-n-jと同様であるので、図15の符号を用いて説明する。
 図23は親ノード1d-1のFPGA12d-1の機能ブロック図である。FPGA12d-1は、GPU受信バッファ120-1,120-2と、GPU送信バッファ121と、ネットワーク送信バッファ122,123と、ネットワーク受信バッファ124,125と、送信部126と、送信部128と、受信部129と、監視部130dと、転送部132dと、転送部133dと、加算部134(第1の加算部)として機能する。
 図24は子ノード1d-k(k=2,・・・,N)のFPGA12d-kの機能ブロック図である。FPGA12d-kは、GPU受信バッファ120-1,120-2と、GPU送信バッファ121と、ネットワーク送信バッファ122,123と、ネットワーク受信バッファ124,125と、送信部126と、受信部127と、送信部128と、受信部129と、監視部130dと、加算部131d(第2の加算部)と、転送部132dと、転送部133dと、加算部134(第1の加算部)として機能する。
 本実施例では、各ノード1d-nのFPGA12d-nに、GPU11d-n-jと同数のGPU受信バッファ120-1,120-2と、通信路20と同数のGPU送信バッファ121とが設けられている。また、各ノード1d-nのFPGA12d-nに、2つのネットワーク送信バッファ122,123と2つのネットワーク受信バッファ124,125とが設けられている。
 ノード1d-nの各GPU11d-n-j(n=1,・・・,N,j=1,・・・,J)のサンプルデータ入力処理と勾配計算処理とGPU内集計処理とは、第1の実施例で説明したとおりである。
 図25は親ノード1d-1のノード間Allreduce処理を説明するフローチャート、図26は子ノード1d-k(k=2,・・・,N)のノード間Allreduce処理を説明するフローチャートである。
 親ノード1d-1の各GPU11d-1-jの送信部114bは、GPU11d-1-jの集計処理部112によって生成された分散データDj[m,1]を、親ノード1d-1のFPGA12d-1のGPU受信バッファ120-1とGPU受信バッファ120-2のうちどちらか一方にDMA転送する(図25ステップS700)。
 第4の実施例と同様に、各GPU11d-1-jの送信部114bは、GPU受信バッファ120-1とGPU受信バッファ120-2のうち、現在ビジーではない方(別のGPUが使用していない方)を選択して分散データDj[m,1]をDMA転送する。
 親ノード1d-1のFPGA12d-1の転送部132dは、FPGA12d-1のGPU受信バッファ120-1,120-2の両方にデータが格納され、ネットワーク送信バッファ122,123のうちどちらかが空であれば、GPU受信バッファ120-1,120-2に格納されているデータを加算部134に転送する(図25ステップS701)。
 親ノード1d-1のFPGA12d-1の加算部134は、GPU受信バッファ120-1,120-2から受信した分散データD1[m,1]とD2[m,1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt[m,1]を生成する(図25ステップS702)。加算部134は、中間集計データRt[m,1]をFPGA12d-1のネットワーク送信バッファ122,123のうち空いている方に転送する(図25ステップS703)。
 子ノード1d-kの各GPU11d-k-jの送信部114bは、GPU11d-k-jの集計処理部112によって生成された分散データDj[m,k]を、子ノード1d-kのFPGA12d-kのGPU受信バッファ120-1とGPU受信バッファ120-2のうち、現在ビジーではない方にDMA転送する(図26ステップS800)。
 子ノード1d-kのFPGA12d-kの転送部132dは、FPGA12d-kのGPU受信バッファ120-1,120-2の両方にデータが格納され、ネットワーク送信バッファ122,123のうちどちらかが空であれば、GPU受信バッファ120-1,120-2に格納されているデータを加算部134に転送する(図26ステップS801)。
 子ノード1d-kのFPGA12d-kの加算部134は、GPU受信バッファ120-1,120-2から受信した分散データD1[m,k]とD2[m,k]との和を、対応する重みw[m]毎に求めることにより、中間集計データRt[m,k]を生成する(図26ステップS802)。加算部134は、中間集計データRt[m,k]をFPGA12d-kのネットワーク送信バッファ122,123のうち空いている方に転送する(図26ステップS803)。
 親ノード1d-1のFPGA12d-1の監視部130dは、FPGA12d-1のネットワーク送信バッファ122または123にデータが格納され、かつFPGA12d-1のネットワーク受信バッファ124,125のうちどちらかが空であれば(図25ステップS704においてYES)、チェックフラグFをセットする(図25ステップS705)。
 同様に、子ノード1d-kのFPGA12d-kの監視部130dは、FPGA12d-kのネットワーク送信バッファ122または123にデータが格納され、かつFPGA12d-kのネットワーク受信バッファ124,125のうちどちらかが空であれば(図26ステップS804においてYES)、チェックフラグFをセットする(図26ステップS805)。
 親ノード1d-1のFPGA12d-1の監視部130dは、自ノードを含む全てのノード1d-nでチェックフラグFがセットされている場合(図25ステップS706においてYES)、FPGA12d-1の送信部126に対してデータ送信を指示する。FPGA12d-1の送信部126は、FPGA12d-1のネットワーク送信バッファ122または123に格納されている中間集計データRt[m,1]を取り出し、取り出したデータを中間集計データRz[m,1]として、通信路20を介して次の番号のノード1d-2に送信する(図25ステップS707)。
 次に、複数の子ノード1d-kのうち、N番目を除く中間のノード1d-i(i=2,・・・,N-1)のFPGA12d-iの受信部127は、ノード1d-(i-1)から通信路20を介して中間集計データRz[m,i-1]を受信する(図26ステップS806)。
 子ノード1d-iのFPGA12d-iの加算部131dは、FPGA12d-iのネットワーク送信バッファ122または123に格納されている中間集計データRt[m,i]を取り出す。そして、加算部131dは、取り出した中間集計データRt[m,i]と通信路20から受信した中間集計データRz[m,i-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRz[m,i]を生成する(図26ステップS807)。
 そして、子ノード1d-iのFPGA12d-iの送信部126は、FPGA12d-iの加算部131dによって生成された中間集計データRz[m,i]を、通信路20を介して次の番号のノード1d-(i+1)に送信する(図26ステップS808)。
 一方、子ノード1d-NのFPGA12d-Nの受信部127は、ノード1d-(N-1)から通信路20を介して中間集計データRz[m,N-1]を受信する(ステップS806)。
 子ノード1d-NのFPGA12d-Nの加算部131dは、FPGA12d-Nのネットワーク送信バッファ122または123に格納されている中間集計データRt[m,N]を取り出す。そして、加算部131dは、取り出した中間集計データRt[m,N]と通信路20から受信した中間集計データRz[m,N-1]との和を、対応する重みw[m]毎に求めることにより、中間集計データRz[m,N]を生成する(ステップS807)。
 そして、子ノード1d-NのFPGA12d-Nの送信部126は、FPGA12d-Nの加算部131dによって生成された中間集計データRz[m,N]を、通信路20を介して親ノード1d-1に送信する(ステップS808)。
 次に、親ノード1d-1のFPGA12d-1の受信部129は、ノード1d-Nから通信路20を介して中間集計データRz[m,N]を受信する(図25ステップS708)。
 親ノード1d-1のFPGA12d-1の送信部128は、受信した中間集計データRz[m,N]を、集計データU[m]として、通信路20を介して次の番号のノード1d-2に送信する(図25ステップS709)。
 また、親ノード1d-1のFPGA12d-1の受信部129は、ノード1d-Nから通信路20を介して受信した集計データU[m](中間集計データRz[m,N])を、FPGA12d-1のネットワーク受信バッファ124,125のうち空いている方に転送する(図25ステップS710)。
 親ノード1d-1のFPGA12d-1の転送部133dは、FPGA12d-1のネットワーク受信バッファ124,125のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12d-1のGPU送信バッファ121に転送する(図25ステップS711)。
 親ノード1d-1のFPGA12d-1の転送部132dは、FPGA12d-1のGPU送信バッファ121に格納されたデータをGPU11d-1-1,GPU11d-1-2にDMA転送する(図25ステップS712)。
 以上で、ノード1d-Nから通信路20を介して受信した集計データU[m]がGPU11d-1-1,11d-1-2にブロードキャスト転送される。
 一方、子ノード1d-kのFPGA12d-kの受信部129は、ノード1d-(k-1)から通信路20を介して集計データU[m]を受信する(図26ステップS809)。子ノード1d-kのFPGA12d-kの送信部128は、受信した集計データU[m]を、通信路20を介して次の番号のノード1d-k+(k+=k+1、ただしk=Nの場合はk+=1)に送信する(図26ステップS810)。
 また、子ノード1d-kのFPGA12d-kの受信部129は、ノード1d-(k-1)から通信路20を介して受信した集計データU[m]を、FPGA12d-kのネットワーク受信バッファ124,125のうち空いている方に転送する(図26ステップS811)。
 子ノード1d-kのFPGA12d-kの転送部133dは、FPGA12d-kのネットワーク受信バッファ124,125のうちどちらかが満杯になると、満杯になったネットワーク受信バッファからデータを取り出し、取り出したデータをFPGA12d-kのGPU送信バッファ121に転送する(図26ステップS812)。
 子ノード1d-kのFPGA12d-kの転送部132dは、FPGA12d-kのGPU送信バッファ121に格納されたデータをGPU11d-k-1,GPU11d-k-2にDMA転送する(図26ステップS813)。
 以上で、ノード1d-(k-1)から通信路20を介して受信した集計データU[m]がGPU11d-k-1,11d-k-2にブロードキャスト転送される。
 各ノード1d-nのGPU11d-n-jの重み更新処理は、第4の実施例と同様である。
 本実施例では、各ノード1d-nの各GPU11d-n-jのDMA待ち時間が減少するため、各GPU11d-n-jは、DMA待ち時間が減少した分だけ他の処理を実行することができる。また、本実施例では、DMA転送キューを用いることで、GPU-FPGAバスの帯域を有効活用できる。また、本実施例では、ネットワーク送信バッファが増えることで、ネットワークの帯域を有効活用できる。また、本実施例では、ノード間Allredude処理を各ノード1d-nの1つのFPGAによって実行できるので、省電力化、省スペース化を実現することができる。また、本実施例では、第1~第4の実施例と比較してFPGA内のネットワーク受信バッファとGPU送信バッファの数を削減することができるので、回路面積を削減することができ、コストを削減することができる。
 本実施例では、集団通信において最も遅い処理であるAllredude処理における全ての集計処理を、FPGA12d-nのハードウェアで実行するため、GPU側の処理が軽くなり、かつ処理レイテンシも高速になる。各GPU11d-n-jは、ビジーではないGPU受信バッファを選択できるので、GPU受信バッファの開放待ちを時間を低減することができ、全体の処理時間を短くすることができる。また、本実施例では、従来技術と同様に1つの通信路20で複数のノード1d-nを接続するので、各ノード1d-nに設けるネットワークポートの数を従来技術と同数にすることができる。また、本実施例では、第1~第5の実施例と比較してチェックフラッグの数が少ないので、全てのチェックフラッグがセットされるまでの待ち時間を短縮することができ、処理時間を短縮することができる。
 第1~第6の実施例で説明したノードの各々は、CPU、GPU等の演算部と記憶装置とインタフェースとを備えたコンピュータと、これらのハードウェア資源を制御するプログラムと、FPGAとによって実現することができる。このコンピュータの構成例を図27に示す。コンピュータは、演算部300と、記憶装置301と、インタフェース装置(I/F)302とを備えている。I/F302には、例えば通信回路が接続される。ノードの各々のCPU、GPU等の演算部300は、各々の記憶装置301に格納されたプログラムに従って第1~第6の実施例で説明した処理を実行する。
 本発明は、ニューラルネットワークの機械学習を行う技術に適用することができる。
 1,1a~1d…ノード、2,2d…ネットワーク、10…CPU、11,11a~11d…GPU、12,12a~12d…FPGA、13…モデル、110…サンプル入力部、111…勾配計算処理部、112,118…集計処理部、113…重み更新処理部、114,114a,114b,116,126,128…送信部、115,117,127,129…受信部、120…GPU受信バッファ、121…GPU送信バッファ、122,123…ネットワーク送信バッファ、124,125…ネットワーク受信バッファ、130,130b,130d…監視部、131,131a,131b,131d,134…加算部、132,132a~132d,133,133c,133d…転送部。

Claims (7)

  1.  ネットワークを介して互いに接続された複数のノードを備え、
     各ノードは、
     学習対象のモデルの重み毎の分散データを生成するように構成された複数のGPUと、
     前記GPUからの前記分散データを格納するように構成された複数の第1の受信バッファと、
     前記第1の受信バッファから転送された前記分散データを格納するように構成された複数の第1の送信バッファと、
     他のノードから受信した集計データを格納するように構成された複数の第2の受信バッファと、
     前記第2の受信バッファから転送された前記集計データを格納するように構成された第2の送信バッファと、
     前記第1の送信バッファにデータが格納され、前記第2の受信バッファに空きがあるときに、チェックフラグをセットするように構成された監視部と、
     前記複数のノードのうち1番目のノードとして機能する場合に自ノードを含む全てのノードで前記チェックフラグがセットされたときに、前記第1の送信バッファに格納された前記分散データを第1の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、更新後の第1の集計データを次の番号のノードに送信するように構成された第1の送信部と、
     前記複数のノードのうち1番目を除くノードとして機能する場合に、他のノードから第1の集計データを受信するように構成された第1の受信部と、
     前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第1の送信バッファに格納された分散データと前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成するように構成された加算部と、
     前記複数のノードのうち1番目のノードとして機能する場合に、前記更新後の第1の集計データを受信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、第2の集計データを受信するように構成された第2の受信部と、
     前記複数のノードのうち1番目のノードとして機能する場合に、前記第2の受信部が受信した第1の集計データを第2の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第2の受信部が受信した第2の集計データを次の番号のノードに送信するように構成された第2の送信部と、
     前記第1の受信バッファに格納された分散データを前記第1の送信バッファに転送し、前記第2の送信バッファに格納された集計データを前記複数のGPUにDMA転送するように構成された第1の転送部と、
     前記第2の受信バッファに格納された集計データを前記第2の送信バッファに転送するように構成された第2の転送部とを備え、
     前記複数のGPUは、前記分散データを前記複数の第1の受信バッファにDMA転送することを特徴とする分散深層学習システム。
  2.  請求項1記載の分散深層学習システムにおいて、
     前記ネットワークに複数の通信路が設定され、
     各ノードは、
     前記複数のGPUと、
     前記通信路と同数の前記第1の受信バッファと、
     1つの前記通信路あたり複数設けられた前記第1の送信バッファと、
     1つの前記通信路あたり複数設けられた前記第2の受信バッファと、
     前記通信路と同数の前記第2の送信バッファと、
     前記監視部と、
     前記第1、第2の送信部と、
     前記第1、第2の受信部と、
     前記加算部と、
     前記第1の転送部と、
     前記第2の転送部とを備え、
     各GPUは、
     それぞれ対応する前記第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、
     前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、
     前記第3の受信部が受信した第2の集計データを他のGPUに送信するように構成された第4の送信部と、
     他のGPUから送信された第2の集計データを受信するように構成された第4の受信部と、
     前記第3の受信部が受信した第2の集計データと前記第4の受信部が受信した第2の集計データとの和を重み毎に求めることにより、第3の集計データを生成するように構成された集計処理部と、
     前記第3の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、
     前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、1つの通信路に対応する前記第2の送信バッファに格納された第2の集計データをこの通信路に対応するGPUにDMA転送し、
     前記第2の転送部は、1つの通信路に対応する第2の受信バッファに格納された第2の集計データをこの通信路に対応する前記第2の送信バッファに転送し、
     前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、
     前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで同一の通信路に対応する前記チェックフラグがセットされ、少なくとも1つのノードで別の通信路に対応するチェックフラグがセットされていないときに、前記同一の通信路に対応する前記第1の送信バッファに格納された分散データを第1の集計データとして、前記同一の通信路を介して次の番号のノードに送信し、
     前記加算部は、1つの通信路に対応する前記第1の送信バッファに格納された分散データとこの通信路から前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とする分散深層学習システム。
  3.  請求項1記載の分散深層学習システムにおいて、
     前記ネットワークに複数の通信路が設定され、
     各ノードは、
     前記複数のGPUと、
     前記通信路と同数の前記第1の受信バッファと、
     1つの前記通信路あたり複数設けられた前記第1の送信バッファと、
     1つの前記通信路あたり複数設けられた前記第2の受信バッファと、
     前記通信路と同数の前記第2の送信バッファと、
     前記監視部と、
     前記第1、第2の送信部と、
     前記第1、第2の受信部と、
     前記加算部と、
     前記第1の転送部と、
     前記第2の転送部とを備え、
     各GPUは、
     前記複数の第1の受信バッファのいずれかに前記分散データをDMA転送するように構成された第3の送信部と、
     前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、
     前記第3の受信部が受信した第2の集計データを他のGPUに送信するように構成された第4の送信部と、
     他のGPUから送信された第2の集計データを受信するように構成された第4の受信部と、
     前記第3の受信部が受信した第2の集計データと前記第4の受信部が受信した第2の集計データとの和を重み毎に求めることにより、第3の集計データを生成するように構成された集計処理部と、
     前記第3の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、
     前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、1つの通信路に対応する前記第2の送信バッファに格納された第2の集計データをこの第2の集計データに対応するGPUにDMA転送し、
     前記第2の転送部は、1つの通信路に対応する第2の受信バッファに格納された第2の集計データをこの通信路に対応する前記第2の送信バッファに転送し、
     前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、
     前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで同一の通信路に対応する前記チェックフラグがセットされ、少なくとも1つのノードで別の通信路に対応するチェックフラグがセットされていないときに、前記同一の通信路に対応する前記第1の送信バッファに格納された前記分散データを第1の集計データとして、前記同一の通信路を介して次の番号のノードに送信し、
     前記加算部は、前記第1の受信部が他のノードから受信した第1の集計データの生成元のGPUと同じ組のGPUによって生成された分散データが前記第1の送信バッファに格納されている場合に、この分散データと前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とする分散深層学習システム。
  4.  請求項1記載の分散深層学習システムにおいて、
     前記ネットワークに複数の通信路が設定され、
     各ノードは、
     前記複数のGPUと、
     前記通信路と同数の前記第1の受信バッファと、
     1つの前記通信路あたり複数設けられた前記第1の送信バッファと、
     1つの前記通信路あたり複数設けられた前記第2の受信バッファと、
     前記通信路と同数の前記第2の送信バッファと、
     前記監視部と、
     前記第1、第2の送信部と、
     前記第1、第2の受信部と、
     前記加算部と、
     前記第1の転送部と、
     前記第2の転送部とを備え、
     各GPUは、
     前記複数の第1の受信バッファのうちビジーでない第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、
     前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、
     前記第3の受信部が受信した第2の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、
     前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、1つの通信路に対応する前記第2の送信バッファに格納された第2の集計データをこの通信路に対応するGPUにDMA転送し、
     前記第2の転送部は、1つの通信路に対応する第2の受信バッファに格納された第2の集計データをこの通信路に対応する前記第2の送信バッファに転送し、
     前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、
     前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで全てのチェックフラグがセットされているときに、前記複数の第1の送信バッファに格納された分散データをそれぞれ第1の集計データとして、格納元の第1の送信バッファに対応する通信路を介して次の番号のノードに送信し、
     前記加算部は、前記複数の通信路に対応する前記複数の第1の送信バッファに格納された分散データと前記複数の通信路から前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とする分散深層学習システム。
  5.  請求項1記載の分散深層学習システムにおいて、
     前記ネットワークに複数の通信路が設定され、
     各ノードは、
     前記複数のGPUと、
     前記通信路と同数の前記第1の受信バッファと、
     1つの前記通信路あたり複数設けられた前記第1の送信バッファと、
     前記複数の通信路に共通に設けられた前記複数の第2の受信バッファと、
     前記複数の通信路に共通に設けられた前記第2の送信バッファと、
     前記監視部と、
     前記第1、第2の送信部と、
     前記第1、第2の受信部と、
     前記加算部と、
     前記第1の転送部と、
     前記第2の転送部とを備え、
     各GPUは、
     前記複数の第1の受信バッファのうちビジーでない第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、
     前記第1の転送部によってDMA転送された第2の集計データを受信するように構成された第3の受信部と、
     前記第3の受信部が受信した第2の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、
     前記第1の転送部は、1つの通信路に対応する前記第1の受信バッファに格納された分散データをこの通信路に対応する前記第1の送信バッファに転送し、前記第2の送信バッファに格納された第2の集計データを前記複数のGPUにDMA転送し、
     前記第2の転送部は、前記複数の第2の受信バッファのいずれかに格納された第2の集計データを前記第2の送信バッファに転送し、
     前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、
     前記第1の送信部は、前記複数のノードのうち1番目のノードとして機能する場合に、自ノードを含む全てのノードで全てのチェックフラグがセットされているときに、前記複数の第1の送信バッファに格納された分散データをそれぞれ第1の集計データとして、格納元の第1の送信バッファに対応する通信路を介して次の番号のノードに送信し、
     前記加算部は、前記複数の通信路に対応する前記複数の第1の送信バッファに格納された分散データと前記複数の通信路から前記第1の受信部が受信した第1の集計データとの和を重み毎に求めて前記更新後の第1の集計データを生成することを特徴とする分散深層学習システム。
  6.  ネットワークを介して互いに接続された複数のノードを備え、
     各ノードは、
     学習対象のモデルの重み毎の分散データを生成するように構成された複数のGPUと、
     前記GPUからの前記分散データを格納するように構成された複数の第1の受信バッファと、
     前記複数の第1の受信バッファから転送された複数の前記分散データの和を重み毎に求めて第1の集計データを生成するように構成された第1の加算部と、
     前記第1の集計データを格納するように構成された複数の第1の送信バッファと、
     他のノードから受信した集計データを格納するように構成された複数の第2の受信バッファと、
     前記第2の受信バッファから転送された前記集計データを格納するように構成された第2の送信バッファと、
     前記第1の送信バッファにデータが格納され、前記第2の受信バッファに空きがあるときに、チェックフラグをセットするように構成された監視部と、
     前記複数のノードのうち1番目のノードとして機能する場合に自ノードを含む全てのノードで前記チェックフラグがセットされたときに、前記第1の送信バッファに格納された第1の集計データを第2の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、更新後の第2の集計データを次の番号のノードに送信するように構成された第1の送信部と、
     前記複数のノードのうち1番目を除くノードとして機能する場合に、他のノードから第2の集計データを受信するように構成された第1の受信部と、
     前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第1の送信バッファに格納された第1の集計データと前記第1の受信部が受信した第2の集計データとの和を重み毎に求めて前記更新後の第2の集計データを生成するように構成された第2の加算部と、
     前記複数のノードのうち1番目のノードとして機能する場合に、前記更新後の第2の集計データを受信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、第3の集計データを受信するように構成された第2の受信部と、
     前記複数のノードのうち1番目のノードとして機能する場合に、前記第2の受信部が受信した第2の集計データを第3の集計データとして次の番号のノードに送信し、前記複数のノードのうち1番目を除くノードとして機能する場合に、前記第2の受信部が受信した第3の集計データを次の番号のノードに送信するように構成された第2の送信部と、
     前記第1の受信バッファに格納された分散データを前記第1の加算部に転送し、前記第2の送信バッファに格納された第3の集計データを前記複数のGPUにDMA転送するように構成された第1の転送部と、
     前記第2の受信バッファに格納された第3の集計データを前記第2の送信バッファに転送するように構成された第2の転送部とを備え、
     前記複数のGPUは、前記分散データを前記複数の第1の受信バッファにDMA転送し、前記第3の集計データに基づいて前記モデルを更新することを特徴とする分散深層学習システム。
  7.  請求項6記載の分散深層学習システムにおいて、
     前記ネットワークに1つの通信路が設定され、
     各ノードは、
     前記複数のGPUと、
     前記GPUと同数の前記第1の受信バッファと、
     前記複数の第1の受信バッファと、
     前記複数の第2の受信バッファと、
     前記通信路と同数の前記第2の送信バッファと、
     前記監視部と、
     前記第1、第2の送信部と、
     前記第1、第2の受信部と、
     前記加算部と、
     前記第1の転送部と、
     前記第2の転送部とを備え、
     各GPUは、
     前記複数の第1の受信バッファのうちビジーでない第1の受信バッファに前記分散データをDMA転送するように構成された第3の送信部と、
     前記第1の転送部によってDMA転送された第3の集計データを受信するように構成された第3の受信部と、
     前記第3の受信部が受信した第3の集計データに基づいて前記モデルを更新するように構成された更新部とを備え、
     前記第2の転送部は、前記複数の第2の受信バッファのいずれかに格納された第3の集計データを前記第2の送信バッファに転送し、
     前記監視部は、前記第1の送信バッファへのデータの格納と前記第2の受信バッファの空きとが、同一の通信路に対応する第1の送信バッファと第2の受信バッファとで起きたときに、この通信路に対応するチェックフラグをセットし、
     前記第2の加算部は、前記複数の第1の送信バッファのいずれかに格納された第1の集計データと前記通信路から前記第1の受信部が受信した第2の集計データとの和を重み毎に求めて前記更新後の第2の集計データを生成することを特徴とする分散深層学習システム。
PCT/JP2019/046373 2019-11-27 2019-11-27 分散深層学習システム WO2021106105A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/779,736 US20230004787A1 (en) 2019-11-27 2019-11-27 Distributed Deep Learning System
PCT/JP2019/046373 WO2021106105A1 (ja) 2019-11-27 2019-11-27 分散深層学習システム
JP2021560823A JP7272460B2 (ja) 2019-11-27 2019-11-27 分散深層学習システム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/046373 WO2021106105A1 (ja) 2019-11-27 2019-11-27 分散深層学習システム

Publications (1)

Publication Number Publication Date
WO2021106105A1 true WO2021106105A1 (ja) 2021-06-03

Family

ID=76129398

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/046373 WO2021106105A1 (ja) 2019-11-27 2019-11-27 分散深層学習システム

Country Status (3)

Country Link
US (1) US20230004787A1 (ja)
JP (1) JP7272460B2 (ja)
WO (1) WO2021106105A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660351A (zh) * 2021-10-18 2021-11-16 湖南兴天电子科技有限公司 数据通信方法、装置、通信终端及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FARAJI, IMAN ET AL.: "GPU-Aware Intranode MPI_Allreduce", THE ACM DIGITAL LIBRARY, pages 45 - 50, XP058055901, Retrieved from the Internet <URL:https://dl.acm.org/doi/abs/10.1145/2642769.2642773> [retrieved on 20200616], DOI: 10.1145/2642769.2642773 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660351A (zh) * 2021-10-18 2021-11-16 湖南兴天电子科技有限公司 数据通信方法、装置、通信终端及计算机可读存储介质
CN113660351B (zh) * 2021-10-18 2022-01-04 湖南兴天电子科技有限公司 数据通信方法、装置、通信终端及计算机可读存储介质

Also Published As

Publication number Publication date
JPWO2021106105A1 (ja) 2021-06-03
JP7272460B2 (ja) 2023-05-12
US20230004787A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
CN108566659B (zh) 一种基于可靠性的5g网络切片在线映射方法
JP6093867B2 (ja) インターコネクトにおける不均一なチャネル容量
US7890649B2 (en) System and method for scalable processing of multi-way data stream correlations
WO2017219890A1 (zh) 软件定义网络中生成路由控制动作的方法和相关设备
CN104683257A (zh) 对进入流量执行流量负载平衡的方法和装置
WO2019134197A1 (zh) 基于朴素贝叶斯分类器的最小负载路由选择方法及系统
CN110891019B (zh) 一种基于负载均衡的数据中心流量调度方法
TW202147188A (zh) 神經網路模型的訓練方法和相關産品
CN111556516B (zh) 面向时延和能效敏感业务的分布式无线网络任务协同分配方法
CN108111335A (zh) 一种调度和链接虚拟网络功能的方法及系统
WO2021106105A1 (ja) 分散深層学習システム
Shahidinejad et al. Sink selection and clustering using fuzzy‐based controller for wireless sensor networks
CN111556173A (zh) 一种基于强化学习的服务链映射方法
JP7135743B2 (ja) 分散処理システムおよび分散処理方法
US20080147881A1 (en) System and method for placing computation inside a network
Li et al. Deep reinforcement learning for load balancing of edge servers in iov
CN117135059B (zh) 一种网络拓扑结构、构造方法、路由算法、设备及介质
CN117579701A (zh) 一种移动边缘网络计算卸载方法及系统
CN112073983A (zh) 基于流量预测的无线数据中心网络拓扑优化方法及系统
KR20190120057A (ko) 로드 균형을 위한 확률 기반 적응형 라우팅 알고리즘
CN115454655A (zh) 一种异步流水线并行训练过程中的动态层迁移方法
Mithila et al. Latency-based vector scheduling of many-task applications for a hybrid cloud
JP7135468B2 (ja) 分散処理システムおよび分散処理方法
Mellouk et al. A bio-inspired quality of service (QoS) routing algorithm
Wang et al. MBSNN: A multi-branch scalable neural network for resource-constrained IoT devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19954216

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021560823

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19954216

Country of ref document: EP

Kind code of ref document: A1