IP Library Granted Patent US 11,803,747
Granted Patent B2
US 11,803,747 · App. 16/878,720 · Granted Oct 31, 2023

Device placement optimization with reinforcement learning

Inventors: Samuel Bengio (Los Altos, CA); Mohammad Norouzi (Richmond Hill, CA); Benoit Steiner (Mountain View, CA); Jeffrey Adgate Dean (Palo Alto, CA); Hieu Hy Pham (Menlo Park, CA); Azalia Mirhoseini (San Jose, CA); Quoc V. Le (Sunnyvale, CA); Naveen Kumar (San Jose, CA); Yuefeng Zhou (Sunnyvale, CA); Rasmus Munk Larsen (San Jose, CA)
Assignee: Google LLC
G06N3/08G06N3/044G06N3/045G06N3/105G06N5/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,803,747
App. No.
16/878,720
Granted
Oct 31, 2023
Kind
B2
Abstract

A method for determining a placement for machine learning model operations across multiple hardware devices is described. The method includes receiving data specifying a machine learning model to be placed for distributed processing on multiple hardware devices; generating, from the data, a sequence of operation embeddings, each operation embedding in the sequence characterizing respective operations necessary to perform the processing of the machine learning model; processing the sequence of operation embeddings using a placement recurrent neural network in accordance with first values of a plurality network parameters of the placement recurrent neural network to generate a network output that defines a placement of the operations characterized by the operation embeddings in the sequence across the plurality of devices; and scheduling the machine learning model for processing by the multiple hardware devices by placing the operations on the multiple devices according to the placement defined by the network output.

Claims (50)

1. A computer-implemented method for training a placement neural network, the placement neural network configured to process a sequence of operation embeddings with each operation embedding in the sequence characterizing one or more respective operations that are part of performing the processing of a machine learning model to generate a network output defining a placement of the operations characterized by the operation embeddings in the sequence across a plurality of devices, the method comprising:

processing a training sequence of operation embeddings using the placement neural network in accordance with current values of network parameters of the placement neural network to select K placements of the operations across the plurality of devices;

for each of the selected K placements:

performing the processing of the machine learning model with the operations across the plurality of devices according to the placement, and

determining a running time required for the processing to complete; and

adjusting the current values of the network parameters using a reinforcement learning technique that uses a reward derived from the running times required for the processing to complete for each of the selected K placements.

2. The method of claim 1 , wherein processing the training sequence of operation embeddings to select the K placements comprises:

running the placement neural network K times to draw the K placements from a probability distribution of placements defined by the placement neural network.

3. The method of claim 2 , wherein running the placement neural network K times to draw the K placements comprises:

providing a batch of K identical input examples to the placement neural network, wherein each input example in the batch is the same training sequence of operation embedding, and

for each input example in the batch, processing the training sequence of operation embeddings through an encoder recurrent neural network and a decoder neural network of the placement neural network to generate a respective placement in accordance with a probability distribution of placements defined by the placement neural network.

4. The method of claim 1 , wherein the reinforcement learning technique is a REINFORCE technique.

5. The method of claim 1 , wherein adjusting the current values of the network parameters using a reinforcement learning technique that uses a reward derived from the times required for the processing to complete for each of the selected K placements comprises:

adjusting the current values of the network parameters to optimize an objective function.

6. The method of claim 5 , wherein the objective function defines a negative of the reward and computes an expected value of square roots of K running times for the selected K placements.

7. The method of claim 5 , wherein the reinforcement learning technique comprises: using a baseline that is a moving average of the K running times to approximate a gradient of the objective function, and backpropagating the gradient of the objective function to determine adjusted values for the network parameters that minimize the objective function.

8. The method of claim 1 , wherein adjusting the current values of the network parameters further comprises: adjusting the operation embeddings in the training sequence as part of the reinforcement learning technique.

9. One or more non-transitory computer storage media storing instructions that, when executed by one or more computers, cause the one or more computers to perform operations for training a placement neural network, the placement neural network configured to process a sequence of operation embeddings with each operation embedding in the sequence characterizing one or more respective operations that are part of performing the processing of a machine learning model to generate a network output defining a placement of the operations characterized by the operation embeddings in the sequence across a plurality of devices, the operations comprising:

processing a training sequence of operation embeddings using the placement neural network in accordance with current values of network parameters of the placement neural network to select K placements of the operations across the plurality of devices;

for each of the selected K placements:

performing the processing of the machine learning model with the operations across the plurality of devices according to the placement, and

determining a running time required for the processing to complete; and

adjusting the current values of the network parameters using a reinforcement learning technique that uses a reward derived from the running times required for the processing to complete for each of the selected K placements.

10. The one or more non-transitory computer storage media of claim 9 , wherein the operations for processing the training sequence of operation embeddings to select the K placements comprise:

running the placement neural network K times to draw the K placements from a probability distribution of placements defined by the placement neural network.

11. The one or more non-transitory computer storage media of claim 10 , wherein the operations for running the placement neural network K times to draw the one or more K placements comprises:

providing a batch of K identical input examples to the placement recurrent neural network, wherein each input example in the batch is the same training sequence of operation embedding, and

for each input example in the batch, processing the training sequence of operation embeddings through an encoder recurrent neural network and a decoder neural network of the placement neural network to generate a respective placement in accordance with a probability distribution of placements defined by the placement neural network.

12. The one or more non-transitory computer storage media of claim 9 , wherein the reinforcement learning technique is a REINFORCE technique.

13. The one or more non-transitory computer storage media of claim 9 , wherein adjusting the current values of the network parameters using a reinforcement learning technique that uses a reward derived from the times required for the processing to complete for each of the selected K placements comprises:

adjusting the current values of the network parameters to optimize an objective function.

14. The one or more non-transitory computer storage media of claim 13 , wherein the objective function computes an expected value of square roots of K running times for the selected K placements.

15. The one or more non-transitory computer storage media of claim 13 , wherein the reinforcement learning technique comprises: using a baseline that is a moving average of the running times to approximate a gradient of the objective function, and backpropagating the gradient of the objective function to determine adjusted values for the network parameters that minimize the objective function.

16. The one or more non-transitory computer storage media of claim 9 , wherein adjusting the current values of the network parameters further comprises:

adjusting the operation embeddings in the training sequence as part of the reinforcement learning technique.

17. A system comprising:

one or more computers; and

one or more non-transitory computer storage media storing instructions that, when executed by the one or more computers, cause the one or more computers to perform operations for training a placement neural network, the placement neural network configured to process a sequence of operation embeddings with each operation embedding in the sequence characterizing one or more respective operations that are part of performing the processing of a machine learning model to generate a network output defining a placement of the operations characterized by the operation embeddings in the sequence across a plurality of devices, the operations comprising:

processing a training sequence of operation embeddings using the placement neural network in accordance with current values of network parameters of the placement neural network to select K placements of the operations across the plurality of devices;

for each of the selected K placements:

performing the processing of the machine learning model with the operations across the plurality of devices according to the placement, and

determining a running time required for the processing to complete; and

adjusting the current values of the network parameters using a reinforcement learning technique that uses a reward derived from the running times required for the processing to complete for each of the selected K placements.

18. The system of claim 17 , wherein the operations for processing the training sequence of operation embeddings to select the K placements comprise:

running the placement neural network K times to draw the K placements from a probability distribution of placements defined by the placement neural network.

19. The system of claim 18 , wherein the operations for running the placement neural network K times to draw the one or more K placements comprises:

providing a batch of K identical input examples to the placement recurrent neural network, wherein each input example in the batch is the same training sequence of operation embedding, and

for each input example in the batch, processing the training sequence of operation embeddings through an encoder recurrent neural network and a decoder neural network of the placement neural network to generate a respective placement in accordance with a probability distribution of placements defined by the placement neural network.

20. The system of claim 17 , wherein adjusting the current values of the network parameters using a reinforcement learning technique that uses a reward derived from the times required for the processing to complete for each of the selected K placements comprises:

adjusting the current values of the network parameters to optimize an objective function.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2020
From: BENGIO, SAMUEL; NOROUZI, MOHAMMAD; STEINER, BENOIT; DEAN, JEFFREY ADGATE; PHAM, HIEU HY; MIRHOSEINI, AZALIA; LE, QUOC V.; KUMAR, NAVEEN; ZHOU, YUEFENG; LARSEN, RASMUS MUNK
To: GOOGLE LLC
Reel/Frame 052990/0575 →
Continuity (4)
Continuation 16445330 · Jun 19, 2019
Continuation PCTUS2018024155 · Mar 23, 2018
Provisional Application 62476618 · Mar 24, 2017
Related Publication 20200279163A1 · Sep 3, 2020