Method and system for determining an expected execution time for a compiled graph using a cost model
AssigneeMoreh Corp.
InventorsGangwon Jo, Jungho Park
Life of this patent
Estimating the term…
Abstract
A method for compiling an application is executed by one or more processors, and includes acquiring profiling information of a system on which an application is to be executed, generating a cost model based on the profiling information, acquiring an intermediate representation of at least a portion of the application, applying compiler passes to the intermediate representation and generating a compiled graph, and using the cost model, determining an expected execution time for the compiled graph.
Claims20
A method performed by at least one first processor, the method comprising:
- acquiring profiling information of a system on which an application program is to be executed;
- generating, based on the profiling information of the system, a cost model;
- acquiring at least two intermediate representations of at least a portion of the application program by:
- determining a first intermediate representation that corresponds to a first portion of the application program executed during a first interval;
- and
- determining a second intermediate representation that corresponds to a second portion of the application program executed during a second interval, wherein the second portion of the application program is different from the first portion of the application program, and wherein the second interval is different from the first interval;
- applying compiler passes to the at least two intermediate representations of the at least the portion of the application program;
- generating, based on the applying the compiler passes, a plurality of compiled graphs associated with the at least two intermediate representations of the at least the portion of the application program;
- determining, using the cost model, an expected execution time for each compiled graph of the plurality of compiled graphs;
- selecting, based on the expected execution time for each compiled graph of the plurality of compiled graphs, a compiled graph of the plurality of compiled graphs;
- and
- transmitting, based on determining that the second intermediate representation is the same as the first intermediate representation, the selected compiled graph of the plurality of compiled graphs to a second processor for execution, wherein the selected compiled graph of the plurality of compiled graphs is executed by the second processor, and wherein the application program is executed based on the selected compiled graph of the plurality of compiled graphs.
An information processing system, comprising:
- a memory;
- and
- one or more processors coupled to the memory and configured to execute one or more computer-readable programs stored in the memory,
- wherein the one or more computer-readable programs comprise instructions that, when executed by a first processor of the one or more processors, cause the information processing system to:
- acquire profiling information of a system on which an application program is to be executed;
- generate, based on the profiling information of the system, a cost model;
- acquire at least two intermediate representations of at least a portion of the application program by:
- determining a first intermediate representation that corresponds to a first portion of the application program executed during a first interval;
- and
- determining a second intermediate representation that corresponds to a second portion of the application program executed during a second interval, wherein the second portion of the application program is different from the first portion of the application program, and wherein the second interval is different from the first interval;
- apply compiler passes to the at least two intermediate representations of the at least the portion of the application program;
- generate, based on the applying the compiler passes, a plurality of compiled graphs associated with the at least two intermediate representations of the at least the portion of the application program;
- determine, using the cost model, an expected execution time for each compiled graph of the plurality of compiled graphs;
- select, based on the expected execution time for each compiled graph of the plurality of compiled graphs, a compiled graph of the plurality of compiled graphs;
- and
- transmit, based on determining that the second intermediate representation is the same as the first intermediate representation, the selected compiled graph of the plurality of compiled graphs to a second processor for execution, wherein the selected compiled graph of the plurality of compiled graphs is executed by the second processor, and wherein the application program is executed based on the selected compiled graph of the plurality of compiled graphs.
One or more non-transitory computer-readable media storing instructions that, when executed by at least one first processor of an information processing system, cause the information processing system to:
- acquire profiling information of a system on which an application program is to be executed;
- generate, based on the profiling information of the system, a cost model;
- acquire at least two intermediate representations of at least a portion of the application program by:
- determining a first intermediate representation that corresponds to a first portion of the application program executed during a first interval;
- and
- determining a second intermediate representation that corresponds to a second portion of the application program executed during a second interval, wherein the second portion of the application program is different from the first portion of the application program, and wherein the second interval is different from the first interval;
- apply compiler passes to the at least two intermediate representations of the at least the portion of the application program;
- generate, based on the applying the compiler passes, a plurality of compiled graphs associated with the at least two intermediate representations of the at least the portion of the application program;
- determine, using the cost model, an expected execution time for each compiled graph of the plurality of compiled graphs;
- select, based on the expected execution time for each compiled graph of the plurality of compiled graphs, a compiled graph of the plurality of compiled graphs;
- and
- transmit, based on determining that the second intermediate representation is the same as the first intermediate representation, the selected compiled graph of the plurality of compiled graphs to a second processor for execution, wherein the selected compiled graph of the plurality of compiled graphs is executed by the second processor, and wherein the application program is executed based on the selected compiled graph of the plurality of compiled graphs.
Dependencies are inferred from the claim text.