Application Compilation Using Cost Models for Multi-Processor Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for compiling applications are inefficient in terms of execution time and resource utilization, particularly in systems with multiple processors, leading to suboptimal performance.
Innovation Solution
A method involving a first processor that generates intermediate representations for application portions, applies compiler passes to create candidate compiled graphs, and selects sub-optimal graphs based on expected execution times, transmitting these to a second processor for execution, while using a cost model to determine and optimize resource usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If traditional compilation methods are used, then the compilation process is simple, but execution time and resource consumption are excessive
Solution Approach 1:
The application is divided into multiple portions, each compiled separately into intermediate representations. This segmentation allows parallel processing and selective optimization of critical sections, reducing overall execution time without requiring complete compilation of the entire application.
Solution Approach 2:
Instead of compiling the entire application with all possible optimizations, the system generates multiple candidate compiled graphs for each portion and selects the sub-optimal graph that achieves sufficient performance improvement, avoiding excessive computational effort.
2Productivity
If multiple candidate compiled graphs are generated, then execution time is reduced, but resource consumption increases
Solution Approach 1:
The system generates a limited number of candidate compiled graphs (e.g., top 5) rather than exhaustively searching all possible compilations. This partial action approach achieves significant productivity improvement while controlling resource consumption by stopping the search after finding sufficiently good candidates.
Solution Approach 2:
The system varies compiler options and optimization parameters to generate diverse candidate compiled graphs from the same intermediate representation. By changing parameters such as optimization level, instruction scheduling, and memory access patterns, the system explores different execution paths without re-compiling from scratch.
3Speed
If the optimal compiled graph is always selected, then execution performance is maximized, but compilation time increases
Solution Approach 1:
The system performs a limited number of compiler passes and generates only a subset of candidate compiled graphs rather than exhaustively searching all possibilities. This partial action strategy achieves acceptable execution speed while significantly reducing compilation time.
Solution Approach 2:
The system performs preliminary compilation to create intermediate representations and generates multiple candidate compiled graphs in advance. These pre-generated candidates can then be selected quickly during execution, reducing the time spent on optimal graph selection at runtime.
Data Source
AI summary
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.


