# US 2019/0317740 A1 · Methods and apparatus for runtime multi-scheduling of software executing on a heterogeneous system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0317740 A1
- Document ID: US20190317740A1
- Status: Published application
- Kind: A1
- Application number: 16/455,379
- Filed: 2019-06-27
- Published: 2019-10-17
- Earliest claimed: 2019-06-27
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Adam Herr; Derek Gerstmann; Justin Gottschlich; Mikael Bourges-Sevenier; Sridhar Sharma
- Web page: https://patentgrep.com/patent/US20190317740A1

## CPC

- G06F 8/41: Compilation
- G06F 8/447: {Target code generation}
- G06F 8/54: Link editing before load time
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06N 3/0985: Hyperparameter optimisation; Meta-learning; Learning-to-learn
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Methods, apparatus, systems and articles of manufacture are disclosed for runtime scheduling of software executing on a heterogeneous system. An example apparatus includes in response to a variant compiler to generate a representation of an algorithm in a domain-specific language (DSL), a compilation auto-scheduler to generate a schedule based on configurations for processing elements of the heterogeneous system, the processing elements including at least a first and a second processing element, the variant compiler to compile variant binaries based on the schedule, each of the variant binaries associated with the algorithm in the DSL, the variant binaries including a first variant binary corresponding to the first processing element and a second variant binary corresponding to the second processing element, and an application compiler to generate a fat binary including a runtime scheduler to select one or more of the variant binaries to execute a workload based on the schedule.

## Claims

### Claim 1

An apparatus for runtime scheduling of software executing on a heterogeneous system, the apparatus comprising:
in response to a variant compiler generating a representation of an algorithm in a domain-specific language (DSL), a compilation auto-scheduler to generate a schedule based on configurations for processing elements of the heterogeneous system, the processing elements including at least a first processing element and a second processing element;
the variant compiler to compile variant binaries based on the schedule, each of the variant binaries associated with the algorithm in the DSL, the variant binaries including a first variant binary corresponding to the first processing element and a second variant binary corresponding to the second processing element; and
an application compiler to generate a fat binary including a runtime scheduler to select one or more of the variant binaries to execute a workload based on the schedule.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the configurations include a first configuration corresponding to the first processing element and a second configuration corresponding to the second processing element, the first configuration including at least one of a host architecture of the first processing element, an application programming interface (API) associated with the first processing element, or scheduling heuristics known to improve a performance of the first processing element.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the processing elements include at least one of a central processing unit, a field programmable gate array, a graphics processing unit, or a vision processing unit.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein:
the variant compiler is to:
add the first variant binary to a variant library;
add a jump table entry to a jump table, the jump table entry including a variant symbol associated with the first processing element;
generate a jump table library including the jump table; and
generate an application programming interface (API) to invoke the runtime scheduler to access the jump table; and
the application compiler is to generate an executable by linking the executable and the fat binary, the executable to invoke the runtime scheduler by invoking the API.

### Claim 5 (depends on 1)

The apparatus of claim 1, further including:
a feedback interface to obtain a performance characteristic of the heterogeneous system from the fat binary, the performance characteristic associated with one or more of the processing elements executing the workload at a first runtime, the fat binary executing according to a function designating successful execution of the fat binary on the heterogeneous system; and
a performance analyzer to:
determine a performance delta based on the performance characteristic and the function; and
prior to a second runtime, adjusting, using a machine learning model, a cost model of the first processing element based on the performance delta.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the cost model is a first cost model, and further including a cost model learner, prior to the second runtime, by using a neural network, adjusting a second cost model of the second processing element based on the performance delta.

### Claim 7 (depends on 5)

The apparatus of claim 5, wherein the performance analyzer is to determine the performance delta by determining a difference between performance achieved at the first runtime and performance as defined by the function designating successful execution of the fat binary on the heterogeneous system.

### Claim 8

A non-transitory computer readable storage medium comprising instructions that, when executed, cause a machine to:
generate a representation of an algorithm in a domain-specific language (DSL);
generate a schedule based on configurations for processing elements of a heterogeneous system, the processing elements including at least a first processing element and a second processing element;
compile variant binaries based on the schedule, each of the variant binaries associated with the algorithm in the DSL, the variant binaries including a first variant binary corresponding to the first processing element and a second variant binary corresponding to the second processing element; and
generate a fat binary including a runtime scheduler to select one or more of the variant binaries to execute a workload based on the schedule.

### Claim 9 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein the configurations include a first configuration corresponding to the first processing element and a second configuration corresponding to the second processing element, the first configuration including at least one of a host architecture of the first processing element, an application programming interface (API) associated with the first processing element, or scheduling heuristics known to improve a performance of the first processing element.

### Claim 10 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein the processing elements include at least one of a central processing unit, a field programmable gate array, a graphics processing unit, or a vision processing unit.

### Claim 11 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein the instructions, when executed, cause the machine to:
add the first variant binary to a variant library;
add a jump table entry to a jump table, the jump table entry including a variant symbol associated with the first processing element;
generate a jump table library including the jump table;
generate an application programming interface (API) to invoke the runtime scheduler to access the jump table; and
generate an executable by linking the executable and the fat binary, the executable to invoke the runtime scheduler by invoking the API.

### Claim 12 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein the instructions, when executed, cause the machine to:
obtain a performance characteristic of the heterogeneous system from the fat binary, the performance characteristic associated with one or more of the processing elements executing the workload at a first runtime, the fat binary executing according to a function designating successful execution of the fat binary on the heterogeneous system;
determine a performance delta based on the performance characteristic and the function; and
prior to a second runtime, adjust, using a machine learning model, a cost model of the first processing element based on the performance delta.

### Claim 13 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the cost model is a first cost model, and wherein the instructions, when executed, cause the machine to, prior to the second runtime, using a neural network, adjust a second cost model of the second processing element based on the performance delta.

### Claim 14 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the instructions, when executed, cause the machine to determine the performance delta by determining a difference between performance achieved at the first runtime and performance as defined by the function designating successful execution of the fat binary on the heterogeneous system.

### Claim 15

A method for runtime scheduling of software executing on a heterogeneous system, the method comprising:
generating a representation of an algorithm in a domain-specific language (DSL);
generating a schedule based on configurations for processing elements of the heterogeneous system, the processing elements including at least a first processing element and a second processing element;
compiling variant binaries based on the schedule, each of the variant binaries associated with the algorithm in the DSL, the variant binaries including a first variant binary corresponding to the first processing element and a second variant binary corresponding to the second processing element; and
generating a fat binary including a runtime scheduler to select one or more of the variant binaries to execute a workload based on the schedule.

### Claim 16 (depends on 15)

The method of claim 15, wherein the configurations include a first configuration corresponding to the first processing element and a second configuration corresponding to the second processing element, the first configuration including at least one of a host architecture of the first processing element, an application programming interface (API) associated with the first processing element, or scheduling heuristics known to improve a performance of the first processing element.

### Claim 17 (depends on 15)

The method of claim 15, wherein the processing elements include at least one of a central processing unit, a field programmable gate array, a graphics processing unit, or a vision processing unit.

### Claim 18 (depends on 15)

The method of claim 15, further including:
adding the first variant binary to a variant library;
adding a jump table entry to a jump table, the jump table entry including a variant symbol associated with the first processing element;
generating a jump table library including the jump table;
generating an application programming interface (API) to invoke the runtime scheduler to access the jump table; and
generating an executable by linking the executable and the fat binary, the executable to invoke the runtime scheduler by invoking the API.

### Claim 19 (depends on 15)

The method of claim 15, further including:
obtaining a performance characteristic of the heterogeneous system from the fat binary, the performance characteristic associated with one or more of the processing elements executing the workload at a first runtime, the fat binary executing according to a function designating successful execution of the fat binary on the heterogeneous system;
determining a performance delta based on the performance characteristic and the function; and
prior to a second runtime, adjusting, using a machine learning model, a cost model of the first processing element based on the performance delta.

### Claim 20 (depends on 19)

The method of claim 19, wherein the cost model is a first cost model, and further including prior to the second runtime, using a neural network, adjusting a second cost model of the second processing element based on the performance delta.

### Claim 21 (depends on 19)

The method of claim 19, wherein determining the performance delta includes determining a difference between performance achieved at the first runtime and performance as defined by the function designating successful execution of the fat binary on the heterogeneous system.

### Claim 22

An apparatus for runtime scheduling of software executing on a heterogeneous system, the apparatus comprising:
first means for generating a representation of an algorithm in a domain-specific language (DSL);
second means for generating a schedule based on configurations for processing elements of the heterogeneous system, the processing elements including at least a first processing element and a second processing element;
means for compiling variant binaries based on the schedule, each of the variant binaries associated with the algorithm in the DSL, the variant binaries including a first variant binary corresponding to the first processing element and a second variant binary corresponding to the second processing element; and
third means for generating a fat binary including a runtime scheduler to select one or more of the variant binaries to execute a workload based on the schedule.

### Claim 23 (depends on 22)

The apparatus of claim 22, wherein the configurations include a first configuration corresponding to the first processing element and a second configuration corresponding to the second processing element, the first configuration including at least one of a host architecture of the first processing element, an application programming interface (API) associated with the first processing element, or scheduling heuristics known to improve a performance of the first processing element.

### Claim 24 (depends on 22)

The apparatus of claim 22, wherein the processing elements include at least one of a central processing unit, a field programmable gate array, a graphics processing unit, or a vision processing unit.

### Claim 25 (depends on 22)

The apparatus of claim 22, wherein:
the means for compiling is to:
add the first variant binary to a variant library;
add a jump table entry to a jump table, the jump table entry including a variant symbol associated with the first processing element;
generate a jump table library including the jump table; and
generate an application programming interface (API) to invoke the runtime scheduler to access the jump table; and
the third means for generating is to generate an executable by linking the executable and the fat binary, the executable to invoke the runtime scheduler by invoking the API.

### Claim at position 26

26-28. (canceled)
