Optimizing functions for target processors by searching through candidate computer programs
AssigneeGoogle Inc.
InventorsEsteban Alberto Real, Mirko Rossini, Connal Joseph de Souza, Manav Garg
Life of this patent
Estimating the term…
Abstract
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for optimizing a target function for execution on a target processor. In particular, the target function is optimized by searching through candidate computer programs that each represent an approximation of the target function.
Claims19
A method performed by one or more computers, the method comprising:
- obtaining data specifying a target function to be optimized for execution on a target processor, the data specifying the target function comprising:
- a plurality of training examples that each comprise an input to the target function and a target output of the target function, and
- a plurality of validation examples that each comprise an input to the target function and a target output of the target function;
- and
- generating a computer program that represents an optimized version of the target function that is optimized for execution on the target processor, the computer program being represented as a computational graph comprising a plurality of vertices and edges, the plurality of vertices comprising a plurality of internal vertices that each represent an instruction selected from a set of instructions for the target processor and a plurality of external vertices that include an input vertex that represents an input to the target function, one or more coefficient vertices that each represent a respective coefficient, and an output vertex that represents an output of the target function, the generating comprising repeatedly performing search operations comprising:
- generating a new candidate computational graph representing a new candidate computer program, the new candidate computational graph comprising a respective plurality of candidate vertices and candidate edges;
- optimizing the new candidate computational graph using the plurality of training examples to determine optimized values for one or more coefficients represented by one or more coefficient vertices included in the respective plurality of candidate vertices;
- determining a precision of the new candidate computer program on the plurality of validation examples when the one or more coefficients have the optimized values;
- determining a measure of performance of executing the new candidate computer program on the target processor;
- and
- adding data specifying the new candidate computational graph, the precision of the new candidate computer program, and the performance of executing the new candidate computer program to a population of candidate computer programs.
A system comprising:
- one or more computers;
- and
- one or more storage devices storing instructions that, when executed by the one or more computers, cause the one or more computers to perform operations comprising:
- obtaining data specifying a target function to be optimized for execution on a target processor, the data specifying the target function comprising:
- a plurality of training examples that each comprise an input to the target function and a target output of the target function, and
- a plurality of validation examples that each comprise an input to the target function and a target output of the target function;
- and
- generating a computer program that represents an optimized version of the target function that is optimized for execution on the target processor, the computer program being represented as a computational graph comprising a plurality of vertices and edges, the plurality of vertices comprising a plurality of internal vertices that each represent an instruction selected from a set of instructions for the target processor and a plurality of external vertices that include an input vertex that represents an input to the target function, one or more coefficient vertices that each represent a respective coefficient, and an output vertex that represents an output of the target function, the generating comprising repeatedly performing search operations comprising:
- generating a new candidate computational graph representing a new candidate computer program, the new candidate computational graph comprising a respective plurality of candidate vertices and candidate edges;
- optimizing the new candidate computational graph using the plurality of training examples to determine optimized values for one or more coefficients represented by one or more coefficient vertices included in the respective plurality of candidate vertices;
- determining a precision of the new candidate computer program on the plurality of validation examples when the one or more coefficients have the optimized values;
- determining a measure of performance of executing the new candidate computer program on the target processor;
- and
- adding data specifying the new candidate computational graph, the precision of the new candidate computer program, and the performance of executing the new candidate computer program to a population of candidate computer programs.
One or more non-transitory computer-readable storage media storing instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:
- obtaining data specifying a target function to be optimized for execution on a target processor, the data specifying the target function comprising:
- a plurality of training examples that each comprise an input to the target function and a target output of the target function, and
- a plurality of validation examples that each comprise an input to the target function and a target output of the target function;
- and
- generating a computer program that represents an optimized version of the target function that is optimized for execution on the target processor, the computer program being represented as a computational graph comprising a plurality of vertices and edges, the plurality of vertices comprising a plurality of internal vertices that each represent an instruction selected from a set of instructions for the target processor and a plurality of external vertices that include an input vertex that represents an input to the target function, one or more coefficient vertices that each represent a respective coefficient, and an output vertex that represents an output of the target function, the generating comprising repeatedly performing search operations comprising:
Dependencies are inferred from the claim text.