IP Library › Granted Patent US 11,392,356
Granted Patent B1
US 11,392,356 · App. 17/187,575 · Granted Jul 19, 2022

Online machine learning based compilation

Inventors: David Leopoldseder (Vienna, AT); Raphael Mosaner (Steyr, AT); Lukas Stadler (Linz, AT)
Assignee: Oracle International Corporation
G06F8/443G06F16/9024G06N20/00
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,392,356
App. No.
17/187,575
Filed
Feb 26, 2021
Granted
Jul 19, 2022
Kind
B1
Art Unit
2191
USPC
717/151
Abstract

A method may include extracting, from an initial compilation graph and for an optimization parameter, a feature. The initial compilation graph may be generated from a function in source code. The method may further include applying, to the initial compilation graph, values of the optimization parameter to generate versions of the initial compilation graph. The versions of the initial compilation graph may correspond to the values of the optimization parameter. The method may further include executing the versions of the initial compilation graph to obtain values of a performance metric, and selecting, as an optimized compilation graph and using the values of the performance metric, a version of the initial compilation graph.

Claims (62)

1. A method comprising:

extracting, from an initial compilation graph and for a first optimization parameter, a first feature, wherein the initial compilation graph is generated from a function in source code;

applying, to the initial compilation graph, a plurality of values of the first optimization parameter to generate a plurality of versions of the initial compilation graph, wherein the plurality of versions of the initial compilation graph correspond to the plurality of values of the first optimization parameter;

executing the plurality of versions of the initial compilation graph to obtain a first plurality of values of a performance metric; and

selecting, as a first optimized compilation graph and using the first plurality of values of the performance metric, a first version of the plurality of versions of the initial compilation graph.

2. The method of claim 1 , further comprising:

storing, in a database, the first feature, the plurality of values of the first optimization parameter, and the first plurality of values of the performance metric.

3. The method of claim 1 , further comprising:

adding, to each of the plurality of versions of the initial compilation graph, an instrumentation node that, when executed, obtains a value of the performance metric.

4. The method of claim 1 , further comprising:

generating a combined compilation graph comprising the plurality of versions of the initial compilation graph and dispatch logic comprising functionality to select one of the plurality of versions of the initial compilation graph when the combined compilation graph is executed.

5. The method of claim 1 ,

extracting, from the first optimized compilation graph and for a second optimization parameter, a second feature;

applying, to the first optimized compilation graph, a plurality of values of the second optimization parameter to generate a plurality of versions of the first optimized compilation graph, wherein the plurality of versions of the first optimized compilation graph correspond to the plurality of values of the second optimization parameter;

executing the plurality of versions of the first optimized compilation graph to obtain a second plurality of values of the performance metric; and

selecting, as a second optimized compilation graph and using the second plurality of values of the performance metric, a version of the plurality of versions of the first optimized compilation graph.

6. The method of claim 1 , further comprising:

determining that a number of executions of the function exceeds a threshold; and

in response to determining that the number of executions of the function exceeds the threshold, replacing the initial compilation graph with a second version of the plurality of versions of the initial compilation graph.

7. The method of claim 6 , wherein the second version of the initial compilation graph is selected using the first plurality of values of the performance metric.

8. The method of claim 1 , further comprising:

generating, using a trained machine learning model, the plurality of values of the first optimization parameter.

9. The method of claim 1 , wherein the plurality of versions of the initial compilation graph are generated while executing the function.

10. A system comprising:

a computer processor;

a repository configured to store (i) source code comprising a function, (ii) an initial compilation graph generated from the function, and (iii) a first optimized compilation graph; and

a dynamic compiler, executing on the computer processor and configured to:

extract, from the initial compilation graph and for a first optimization parameter, a first feature,

apply, to the initial compilation graph, a plurality of values of the first optimization parameter to generate a plurality of versions of the initial compilation graph, wherein the plurality of versions of the initial compilation graph correspond to the plurality of values of the first optimization parameter,

execute the plurality of versions of the initial compilation graph to obtain a first plurality of values of a performance metric, and

select, as a first optimized compilation graph and using the first plurality of values of the performance metric, a first version of the plurality of versions of the initial compilation graph.

11. The system of claim 10 , wherein the dynamic compiler is further configured to:

store, in a database, the first feature, the first plurality of values of the first optimization parameter, and the first plurality of values of the performance metric.

12. The system of claim 10 , wherein the dynamic compiler is further configured to:

add, to each of the plurality of versions of the initial compilation graph, an instrumentation node that, when executed, obtains a value of the performance metric.

13. The system of claim 10 , wherein the dynamic compiler is further configured to:

generate a combined compilation graph comprising the plurality of versions of the initial compilation graph and dispatch logic comprising functionality to select one of the plurality of versions of the initial compilation graph when the combined compilation graph is executed.

14. The system of claim 10 , wherein the dynamic compiler is further configured to,

extract, from the first optimized compilation graph and for a second optimization parameter, a second feature,

apply, to the first optimized compilation graph, a plurality of values of the second optimization parameter to generate a plurality of versions of the first optimized compilation graph, wherein the plurality of versions of the first optimized compilation graph correspond to the plurality of values of the second optimization parameter,

execute the plurality of versions of the first optimized compilation graph to obtain a second plurality of values of the performance metric, and

select, as a second optimized compilation graph and using the second plurality of values of the performance metric, a version of the plurality of versions of the first optimized compilation graph.

15. The system of claim 10 , wherein the dynamic compiler is further configured to:

determine that a number of executions of the function exceeds a threshold; and

in response to determining that the number of executions of the function exceeds the threshold, replace the initial compilation graph with a second version of the plurality of versions of the initial compilation graph.

16. The system of claim 15 , wherein the dynamic compiler selects the second version of the initial compilation graph using the first plurality of values of the performance metric.

17. The system of claim 10 , wherein the dynamic compiler generates the plurality of versions of the initial compilation graph while executing the function.

18. A method comprising:

extracting, from an initial compilation graph and for a first optimization parameter, a first feature, wherein the initial compilation graph is generated from a function in source code;

generating a first plurality of feature clusters by clustering a first plurality of features included in first training data of a machine learning model;

determining that the first feature matches a feature cluster in the first plurality of feature clusters;

predicting a value of the first optimization parameter by applying the machine learning model to the first optimization parameter and the first feature; and

applying, to the initial compilation graph, the value of the first optimization parameter to generate a first optimized compilation graph.

19. The method of claim 18 , further comprising:

training the machine learning model by executing a plurality of versions of the initial compilation graph to obtain a plurality of values of a performance metric,

wherein the plurality of versions of the initial compilation graph correspond to a plurality of values of the first optimization parameter, and

wherein the first training data further comprises the plurality of values of the first optimization parameter and the plurality of values of the performance metric.

20. The method of claim 18 , further comprising:

extracting, from the initial compilation graph and for a second optimization parameter, a second feature;

determining that the second feature fails to match any feature cluster in the plurality of feature clusters;

generating a second plurality of feature clusters by clustering a second plurality of features; and

retraining the machine learning model using second training data comprising the second plurality of features.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 2, 2021
From: LEOPOLDSEDER, DAVID; MOSANER, RAPHAEL; STADLER, LUKAS
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 055453/0905 →
Cited By (2)
US 12,493,827 US 12,664,069