Heterogeneous Processing Element Selection via Cyclomatic Complexity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for optimizing the performance of heterogeneous computer systems by distributing workload between CPU and GPU are not guaranteed to minimize throughput time due to reliance on prediction accuracy, which may lead to suboptimal execution on processing elements with inferior throughput characteristics.
Innovation Solution
A method that calculates the cyclomatic complexity score of a computer program code module to determine the most suitable processing element between CPU and GPU, followed by actual runtime comparison to identify the processing element producing the shortest execution time for efficient execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If prediction-based load balancing is used to distribute workload between CPU and GPU, then the system can achieve balanced parallel execution, but the throughput time cannot be guaranteed to be minimized due to prediction accuracy limitations
Solution Approach 1:
The system performs preliminary runtime measurements of code modules on both CPU and GPU during a profiling phase. These measurements are stored and used to make informed scheduling decisions during actual execution, eliminating the need for inaccurate real-time predictions while minimizing throughput time.
Solution Approach 2:
The system implements a feedback mechanism where actual runtime measurements from previous executions are continuously collected and used to update the scheduling decisions. This feedback loop ensures that the scheduler adapts to actual performance characteristics rather than relying on theoretical predictions, thereby minimizing throughput time.
2Ease of operation
If code modules are executed on processing elements based on architectural assumptions, then load distribution can be simplified, but suboptimal execution may occur when assumptions do not match actual performance characteristics
Solution Approach 1:
The system allows code modules to essentially self-select their optimal processing element by measuring their actual runtime on both CPU and GPU. The module with the shorter measured runtime is automatically selected, eliminating the need for complex architectural analysis or manual scheduling rules while maximizing execution efficiency.
Solution Approach 2:
Instead of relying on fixed architectural parameters or static code characteristics to determine scheduling decisions, the system dynamically changes the selection criterion to be based on actual runtime measurements. This parameter change from static to dynamic selection ensures optimal execution efficiency while keeping the scheduling mechanism simple.
Data Source
AI summary
Method and system are provided for identifying a processing element for executing a computer program code module. The method includes: calculating a cyclomatic complexity score for the module; selecting one of a first or second processing element based on the calculated complexity score, the first processing element having a first architecture and the second processing element having a second architecture different from the first architecture, the first and second processing elements forming part of a heterogeneous computer system; running the module on the selected processing element to determine a first run time, and subsequently running the module on the non-selected processing element to determine a second run time; comparing the first and second run time to identify a shortest run time; and identifying a processing element producing a shortest run time as the processing element for executing the computer program code module.


