Compiler Optimization for Parallelism and Locality in Multi-Core Architectures
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current compilers fail to efficiently optimize source code for complex processor architectures with multiple cores, struggling to balance parallelism and locality optimizations, leading to weak scalability and disappointing performance due to the memory wall bottleneck and unstructured search spaces.
Innovation Solution
A system and method that optimize source code for execution on a second computing apparatus with multiple multi-stage execution units by analyzing tradeoffs between parallel and serial execution costs, using loop fusion, permutability, tiling, and affine scheduling to produce optimized code that balances parallelism and locality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If current compilers are used to translate source code for multi-core architectures, then the code can be compiled and executed, but the execution efficiency is poor due to inability to effectively exploit parallelism and locality
Solution Approach 1:
The patent introduces an advanced compiler system that acts as an intermediary between the source code and the complex multi-core processor architecture. This compiler incorporates sophisticated optimization algorithms including parallelism detection, loop transformation capabilities, and memory access pattern analysis to bridge the gap between high-level code and low-level architectural complexity, thereby improving execution efficiency without requiring changes to the processor hardware
Solution Approach 2:
The patent applies parameter changes by dynamically adjusting compilation parameters and optimization strategies based on the target architecture's characteristics. The compiler analyzes the specific multi-core architecture parameters (number of cores, cache hierarchy, memory bandwidth) and transforms the source code with appropriate parallelization degrees, loop tiling factors, and memory access optimizations tailored to those parameters, resolving the contradiction between execution efficiency and architectural complexity
2Productivity
If parallelism optimization is prioritized to utilize multiple cores, then processing throughput increases, but memory bandwidth bottleneck (memory wall) becomes more severe due to increased memory access demands
Solution Approach 1:
The patent applies segmentation by dividing the computational workload into smaller tasks that can be executed in parallel while maintaining data locality. The compiler performs loop tiling and block decomposition to split large computation loops into smaller chunks that fit within cache memory, allowing multiple processing cores to work simultaneously on different segments without contending for the same memory bandwidth, thus increasing throughput while mitigating the memory wall effect
Solution Approach 2:
The patent introduces another dimension by transforming sequential loop structures into multi-dimensional parallel loop nests. The compiler identifies iteration spaces that can be mapped to multiple dimensions, enabling parallel execution across cores while organizing memory access patterns to exploit spatial and temporal locality in different dimensions, thereby achieving high throughput without proportionally increasing memory bandwidth requirements
3Speed
If locality optimization is prioritized to improve memory access efficiency, then memory bandwidth utilization improves, but parallelism exploitation is reduced due to data dependency constraints
Solution Approach 1:
The patent applies local quality by implementing different optimization strategies for different regions of the code and different types of data accesses. The compiler analyzes the program to identify hot spots with high parallelism potential versus regions with strict data dependencies, applying aggressive parallelization to the former and locality-optimized access patterns to the latter, thereby achieving both good memory efficiency and parallelism exploitation in appropriate contexts
Solution Approach 2:
The patent introduces dynamics by making the optimization strategy adaptive rather than static. The compiler dynamically selects between parallelism-oriented and locality-oriented transformations based on runtime or static analysis of data access patterns, dependency structures, and target architecture characteristics. This dynamic approach allows the system to maximize parallelism where possible while maintaining locality where dependencies require it, resolving the contradiction between the two goals
4Productivity
If the search space for optimization is expanded to explore more transformation combinations, then better optimization solutions can be found, but the compilation time increases significantly due to the huge and unstructured search space
Solution Approach 1:
The patent applies preliminary action by performing static analysis and program transformation validation before actual code generation. The compiler pre-computes dependency information, identifies valid transformation regions, and caches analysis results to guide the optimization search. This preliminary preparation structures the search space and eliminates invalid transformation combinations early, allowing thorough exploration of viable optimizations without proportionally increasing compilation time
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 avow for parallel execution of tasks. The first custom computing apparatus optimizes the code for both parallelism and locality of operations 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.


