# US 11,113,059 B1 · Dynamic allocation of executable code for multi-architecture heterogeneous computing

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

- Number: US 11,113,059 B1
- Document ID: US11113059B1
- Status: Granted
- Kind: B1
- Application number: 17/172,134
- Filed: 2021-02-10
- Granted: 2021-09-07
- Earliest claimed: 2021-02-10
- Assignees: Next Silicon Ltd
- Applicants: Next Silicon Ltd
- Inventors: Elad Raz; Ilan Tayari
- Web page: https://patentgrep.com/patent/US11113059B1

## CPC

- G06F 8/41: Compilation
- G06F 9/3005: {to perform operations for flow control}
- G06F 8/447: {Target code generation}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/541: {via adapters, e.g. between incompatible applications}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An apparatus for executing a software program, comprising processing units and a hardware processor adapted for: in an intermediate representation of the software program, where the intermediate representation comprises blocks, each associated with an execution block of the software program and comprising intermediate instructions, identifying a calling block and a target block, where the calling block comprises a control-flow intermediate instruction to execute a target intermediate instruction of the target block; generating target instructions using the target block; generating calling instructions using the calling block and a computer control instruction for invoking the target instructions, when the calling instructions are executed by a calling processing unit and the target instructions are executed by a target processing unit; configuring the calling processing unit for executing the calling instructions; and configuring the target processing unit for executing the target instructions.

## Claims

### Claim 1

An apparatus for executing a software program, the apparatus comprising a plurality of processing units and at least one hardware processor adapted for:
in an intermediate representation of the software program, where the intermediate representation comprises a plurality of blocks, each associated with one of a plurality of execution blocks of the software program and comprising a set of intermediate instructions, identifying a calling block and a target block, where the calling block comprises at least one control-flow intermediate instruction to execute at least one target intermediate instruction of the target block;
generating a target set of executable instructions using the target block;
generating a calling set of executable instructions using the calling block and using at least one computer control instruction for invoking the target set of executable instructions, when the calling set of executable instructions is executed by a calling processing unit and the target set of executable instructions is executed by a target processing unit;
configuring the calling processing unit for executing the calling set of executable instructions; and
configuring the target processing unit for executing the target set of executable instructions.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the target processing unit is further configured for providing the calling processing unit with at least one value produced by the target processing unit executing at least some of the target set of instructions.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the calling processing unit is further configured for receiving the at least one value, produced by the target processing unit executing at least some of the target set of instructions, from the calling processing unit.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the calling processing unit is further configured for providing the target processing unit with at least one argument value.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the target processing unit is further configured for instructing, after executing at least some other of the target set of instructions, the calling processing unit to execute at least some of the calling set of executable instructions.

### Claim 6 (depends on 5)

The apparatus of claim 5, wherein the calling processing unit is further configured for:
suspending execution of the calling set of executable instructions after executing the at least one computer control instruction for invoking the target set of executable instructions; and
executing the at least some of the calling set of executable instructions in response to receiving an instruction from the target processing unit.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the target processing unit is selected from the group of processing units consisting of: a central processing unit, a multi-core central processing unit (CPU), a data processing unit (DPU), a microcontroller unit (MCU), an accelerated processing unit (ACU), a field-programmable gate array (FPGA), a coarse-grained reconfigurable architecture (CGRA), a neural-network accelerator, an intelligence processing unit (IPU), an application-specific integrated circuit (ASIC), a quantum computer, and an interconnected computing grid, comprising a plurality of reconfigurable logical elements connected by a plurality of configurable data routing junctions.

### Claim 8 (depends on 1)

The apparatus of claim 1, wherein a first computer architecture of the calling processing unit is different from a second computer architecture of the target processing unit.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the calling set of executable instructions comprises a plurality of conversion instructions, implementing an application binary interface applied to the at least one control-flow intermediate instruction to convert between the first computer architecture of the calling processing unit and the second computer architecture of the target processing unit.

### Claim 10 (depends on 8)

The apparatus of claim 8, wherein the target block comprises a plurality of target metadata values; and
wherein generating the target set of executable instructions comprises generating a plurality of converted target metadata values using the plurality of target metadata values according to the second computer architecture of the target processing unit.

### Claim 11 (depends on 1)

The apparatus of claim 1, wherein the calling set of executable instructions comprises at least one first memory access instruction to at least one memory address in an identified range of application memory addresses; and
wherein the target set of executable instructions comprises at least one second memory access instruction to at least one other memory address in the identified range of application memory addresses.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the identified range of application memory addresses is one of: a range of physical memory addresses, a range of virtual memory addresses, a range of memory-mapped input-output addresses, and a range of bus addresses.

### Claim 13 (depends on 1)

The apparatus of claim 1, wherein the calling set of executable instructions comprises accessing at least one device using at least one device handle associated with the at least one device; and
wherein the target set of executable instructions comprises accessing the at least one device using the at least one device handle.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the at least one device handle is at least one of: a network socket handle, an operating system kernel object handle, and a file descriptor.

### Claim 15 (depends on 1)

The apparatus of claim 1, wherein the at least one hardware processor is further adapted for:
collecting a plurality of statistical values while executing at least part of the software program; and
identifying the calling block and the target block according to the plurality of statistical values.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein at least one of the plurality of statistical values indicative of one of: an outcome of executing a control-flow instruction, a data value of a variable of the software program, a memory access pattern, and a memory virtual address translation.

### Claim 17 (depends on 15)

The apparatus of claim 15, wherein the at least one hardware processor is further adapted for:
inserting a plurality of telemetry intermediate instructions into the intermediate representation of the software program, for the purpose of collecting the plurality of statistical values.

### Claim 18 (depends on 1)

The apparatus of claim 1, wherein the calling processing unit is the at least one hardware processor.

### Claim 19

A method for executing a software program, comprising:
in an intermediate representation of the software program, where the intermediate representation comprises a plurality of blocks, each associated with one of a plurality of execution blocks of the software program and comprising a set of intermediate instructions, identifying a calling block and a target block, where the calling block comprises at least one control-flow intermediate instruction to execute at least one target intermediate instruction of the target block;
generating a target set of executable instructions using the target block;
generating a calling set of executable instructions using the calling block and using at least one computer control instruction for invoking the target set of executable instructions, when the calling set of executable instructions is executed by a calling processing unit of a plurality of processing units and the target set of executable instructions is executed by a target processing unit of the plurality of processing units;
configuring the calling processing unit for executing the calling set of executable instructions; and
configuring the target processing unit for executing the target set of executable instructions.

### Claim 20

A software program product for executing a software program, comprising:
a non-transitory computer readable storage medium;
first program instructions for: in an intermediate representation of the software program, where the intermediate representation comprises a plurality of blocks, each associated with one of a plurality of execution blocks of the software program and comprising a set of intermediate instructions, identifying a calling block and a target block, where the calling block comprises at least one control-flow intermediate instruction to execute at least one target intermediate instruction of the target block;
second program instructions for generating a target set of executable instructions using the target block;
third program instructions for generating a calling set of executable instructions using the calling block and using at least one computer control instruction for invoking the target set of executable instructions, when the calling set of executable instructions is executed by a calling processing unit of a plurality of processing units and the target set of executable instructions is executed by a target processing unit of the plurality of processing units;
fourth program instructions for configuring the calling processing unit for executing the calling set of executable instructions; and
fifth program instructions for configuring the target processing unit for executing the target set of executable instructions;
wherein the first, second, third, fourth and fifth program instructions are executed by at least one computerized processor from the non-transitory computer readable storage medium.
