Optimized division of work among processors in a heterogeneous processing system
Abstract
A compiler implemented by a computer performs optimized division of work across heterogeneous processors. The compiler divides source code into code sections and characterizes each of the code sections based on pre-defined criteria. Each of the code sections is characterized as at least one of: allocate to a main processor, allocate to a processing element, allocate to one of a parameterized main processor and a parameterized processing element, and indeterminate. The compiler analyzes side-effects and costs of executing the code sections on allocated processors, and transforms the code sections based on results of the analyzing. The transforming includes re-characterizing the code sections for alternate execution in a runtime environment.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A system, comprising:
a computer; and a compiler for producing code that is executable by the computer, the compiler configured to implement a method, the method comprising: dividing source code into code sections; characterizing each of the code sections based on pre-defined criteria, each of the code sections characterized as at least one of: allocate to a main processor, allocate to a processing element, allocate to one of a parameterized main processor and a parameterized processing element, and indeterminate; analyzing side-effects and costs of executing the code sections on allocated processors; and transforming the code sections based on results of the analyzing, the transforming including re-characterizing the code sections for alternate execution in a runtime environment.
2 . The system of claim 1 , wherein the dividing the code into the code sections is implemented by at least one of:
direct user input received at the compiler; a program structure of the source code; code semantics; data dependencies; code size; and profiling data.
3 . The system of claim 2 , wherein elements of the program structure used in dividing the source code include at least one of:
program functions; loops; basic blocks; and call graph connected components.
4 . The system of claim 1 , wherein the pre-defined criteria include at least one of:
number of compute operations; memory access patterns; amount of bandwidth required to execute the code sections; function calls; branches; size of the code sections; profiling data; user input; vector parallelism; fine-grain parallelism; and synchronization requirements.
5 . The system of claim 1 , wherein the transforming the code sections includes producing an execution scheme for the code sections, the execution scheme identifying at least one of:
at least one of the code sections assigned for execution in parallel with at least one other of the code sections; at least one of the code sections assigned for execution on the main processor; at least one of the code sections assigned for execution on the processing element; and at least one of the code sections predicated on a parameter.
6 . The system of claim 1 , wherein a code section characterized as allocated to the parameterized main processor results in execution of the code section on the main processor when a compiler-determined parameter evaluates to true at runtime.
7 . The system of claim 1 , wherein a code section characterized as allocated to the parameterized processing element results in execution of the code section on the processing element when a compiler-determined parameter evaluates to true at runtime.
8 . The system of claim 1 , wherein the code sections characterized as indeterminate by the compiler indicate that a processor type for executing the code sections is determined by a runtime system using dynamic information on current system state and performance feedback, wherein processor types include the main processor and the processing element.
9 . The system of claim 1 , wherein the side-effects evaluated include effects of concurrent execution of the code sections on at least one of a plurality of main processors and at least one of a plurality of processing elements in terms of at least one of resource availability, maximum power constraints, data layout, and synchronization optimization.
10 . The system of claim 1 , wherein the costs evaluated include costs due to placing successive code sections on different processors, costs associated with processing element start-ups and any additional data transfers required as a result of executing the code sections on the allocated processors.
11 . An active memory system, comprising:
a computer; and a compiler for producing code that is executable by the computer, the compiler configured to implement a method, the method comprising: dividing source code into code sections; characterizing each of the code sections based on pre-defined criteria, each of the code sections characterized as at least one of: allocate to a main processor, allocate to a processing element, allocate to one of a parameterized main processor and a parameterized processing element, and indeterminate, wherein a parameter used in the characterizing includes a constraint imposed by a power budget for the active memory system; analyzing side-effects and costs of executing the code sections on allocated processors, the side-effects including the constraint; and transforming the code sections based on results of the analyzing, the transforming including re-characterizing the code sections for alternate execution in a runtime environment.
12 . The active memory system of claim 11 , wherein the pre-defined criteria includes fine-grained task parallelism, and the re-characterizing the code sections for alternate execution includes allocating the code sections among a plurality of execution slices in at least one of the processing elements.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.