Processing of reduction and broadcast operations on large datasets with mutli-dimensional hardware accelerators
AssigneeGoogle Inc.
InventorsBjarke Hammersholt Roune, Sameer Kumar
Life of this patent
Estimating the term…
Abstract
Methods, systems, and apparatus, including instructions encoded on storage media, for performing reduction of gradient vectors and similarly structured data that are generated in parallel, for example, on nodes organized in a mesh or torus topology defined by connections in at least two dimension between the nodes. The methods provide parallel computation and communication between nodes in the topology.
Claims21
1-12. (canceled)
A method for processing training data using processing hardware, the method comprising:
- training a respective replica of a machine learning model on each node of a plurality of nodes organized in a multi-dimensional topology comprising rows and columns of nodes, wherein each node is trained on a respective batch of training data in parallel, whereby after the training each node holds a respective gradient vector resulting from the training;
- and
- combining the respective gradient vectors in the nodes to generate a final gradient vector by performing operations comprising:
- performing, by code executing on the nodes, a first phase of a circle algorithm for each of the rows of the multi-dimensional topology in parallel to generate in each node of the row different combined data for a portion of the final gradient vector;
- performing, by code executing on the nodes, a second portion of the first phase of the circle algorithm for each of the columns of the multi-dimensional topology in parallel to generate in each node of the column a different column result comprising a portion of the combined data from each of the rows;
- performing, by code executing on the nodes, a first portion of a second phase of the circle algorithm for each of the columns of the multi-dimensional topology in parallel to generate in each column a portion of the final gradient vector comprising each column result;
- and
- performing, by code executing on the nodes, a second portion of the second phase of the circle algorithm for each of the rows of the multi-dimensional topology in parallel to generate in each row the final gradient vector comprising each portion of the final gradient vector from each of the columns.
A data processing apparatus comprising a plurality of processing units, each processing unit corresponding to a respective node, wherein the data processing apparatus is configured to perform operations, the operations comprising:
- training a respective replica of a machine learning model on each node of a plurality of nodes organized in a multi-dimensional topology comprising rows and columns of nodes, wherein each node is trained on a respective batch of training data in parallel, whereby after the training each node holds a respective gradient vector resulting from the training;
- and
- combining the respective gradient vectors in the nodes to generate a final gradient vector by performing operations comprising:
- performing, by code executing on the nodes, a first phase of a circle algorithm for each of the rows of the multi-dimensional topology in parallel to generate in each node of the row different combined data for a portion of the final gradient vector;
- performing, by code executing on the nodes, a second portion of the first phase of the circle algorithm for each of the columns of the multi-dimensional topology in parallel to generate in each node of the column a different column result comprising a portion of the combined data from each of the rows;
- performing, by code executing on the nodes, a first portion of a second phase of the circle algorithm for each of the columns of the multi-dimensional topology in parallel to generate in each column a portion of the final gradient vector comprising each column result;
- and
- performing, by code executing on the nodes, a second portion of the second phase of the circle algorithm for each of the rows of the multi-dimensional topology in parallel to generate in each row the final gradient vector comprising each portion of the final gradient vector from each of the columns.
One or more non-transitory computer-readable storage media encoded with instructions which when executed by processing hardware cause the processing hardware to perform operations, wherein the operations comprise:
- training a respective replica of a machine learning model on each node of a plurality of nodes organized in a multi-dimensional topology comprising rows and columns of nodes, wherein each node is trained on a respective batch of training data in parallel, whereby after the training each node holds a respective gradient vector resulting from the training;
- and
- combining the respective gradient vectors in the nodes to generate a final gradient vector by performing operations comprising:
- performing, by code executing on the nodes, a first phase of a circle algorithm for each of the rows of the multi-dimensional topology in parallel to generate in each node of the row different combined data for a portion of the final gradient vector;
- performing, by code executing on the nodes, a second portion of the first phase of the circle algorithm for each of the columns of the multi-dimensional topology in parallel to generate in each node of the column a different column result comprising a portion of the combined data from each of the rows;
- performing, by code executing on the nodes, a first portion of a second phase of the circle algorithm for each of the columns of the multi-dimensional topology in parallel to generate in each column a portion of the final gradient vector comprising each column result;
- and
- performing, by code executing on the nodes, a second portion of the second phase of the circle algorithm for each of the rows of the multi-dimensional topology in parallel to generate in each row the final gradient vector comprising each portion of the final gradient vector from each of the columns.
Dependencies are inferred from the claim text.