Polyhedral Compiler Optimization for Multi-Core Memory Locality
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current compilers fail to efficiently optimize parallelism, locality, and contiguity of memory accesses across heterogeneous hardware architectures, leading to poor scalability and performance in multi-core computing environments.
Innovation Solution
A system and method for optimizing computer program source code that considers parallel operations and locality on a first computing apparatus to produce optimized code for execution on a second computing apparatus with multiple multi-stage execution units, using polyhedral representations and transformations to balance execution costs and improve memory access efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If current compilers are used to translate source programs, then the compilation process is simple, but the optimization of parallelism and locality is insufficient leading to poor scalability
Solution Approach 1:
The compiler is divided into multiple specialized modules including parallelism analysis module, locality analysis module, polyhedral representation module, and code generation module. Each module handles specific optimization tasks independently, allowing complex optimizations to be achieved through coordinated simple components.
Solution Approach 2:
A polyhedral representation is introduced as an intermediary data structure between source code and target code. This representation captures program semantics in a form that facilitates systematic optimization while maintaining a clear separation between compilation stages.
2Quantity of substance
If memory bandwidth is increased to handle multi-core processing, then processing capacity improves, but the memory wall problem worsens due to non-contiguous memory accesses
Solution Approach 1:
The compiler performs preliminary analysis of memory access patterns during compilation and reorders operations to ensure contiguous memory accesses before execution. This prevents memory access inefficiency from occurring during runtime.
Solution Approach 2:
The compiler transforms memory access parameters by changing the order of operations and data layout to achieve contiguous access patterns. This includes loop reordering, array reorganization, and operation scheduling to maximize spatial and temporal locality.
3Power
If more parallel operations are introduced to exploit multi-core architecture, then computational power increases, but execution coordination and memory access patterns become more complex
Solution Approach 1:
The program is segmented into independent computational tasks that can be executed in parallel. The parallelism analysis module identifies these segments automatically, and the code generation module produces coordinated execution code for multiple cores.
Solution Approach 2:
The optimization process incorporates feedback loops where the compiler analyzes execution characteristics, adjusts parallelization strategies, and iteratively refines the generated code to balance computational power with execution coordination requirements.
4Manufacturing precision
If the search space for optimization is explored more thoroughly, then optimization quality improves, but compilation time increases due to huge and unstructured search space
Solution Approach 1:
The compiler transforms the unstructured optimization search space into a structured polyhedral parameter space. This allows systematic exploration of optimizations using mathematical programming techniques, achieving high optimization quality without exhaustive search.
Solution Approach 2:
The compiler replaces brute-force mechanical search with mathematical optimization methods. The polyhedral model enables the use of linear programming and integer programming algorithms to efficiently find optimal transformations without exhaustive enumeration.
Data Source
AI summary
Methods, apparatus and computer software product for source code optimization are provided. In an exemplary embodiment, a first custom computing apparatus is used to optimize the execution of source code on a second computing apparatus. In this embodiment, the first custom computing apparatus contains a memory, a storage medium and at least one processor with at least one multi-stage execution unit. The second computing apparatus contains at least two multi-stage execution units that allow for parallel execution of tasks. The first custom computing apparatus optimizes the code for parallelism, locality of operations and contiguity of memory accesses on the second computing apparatus. This Abstract is provided for the sole purpose of complying with the Abstract requirement rules. This Abstract is submitted with the explicit understanding that it will not be used to interpret or to limit the scope or the meaning of the claims.


