Compiler Source Code Optimization for Vector Execution Units
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current compilers struggle to efficiently optimize source code for complex heterogeneous architectures, failing to jointly optimize scheduling and constant-stride memory accesses, which limits the utilization of parallelism and locality, leading to suboptimal performance on modern multi-core and vector-based processors.
Innovation Solution
A method and apparatus that optimize computer program source code by analyzing tradeoffs between parallel operations, constant-stride memory accesses, and data layout transformations to produce optimized code for execution on multi-stage vector execution units, using a customized computing apparatus to minimize execution costs and leverage vector operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If compilers optimize for parallelism, then computational operations per second increase, but memory locality deteriorates
Solution Approach 1:
The patent segments the optimization process into multiple independent phases: parallelism extraction, locality optimization, and constant-stride transformation. Each phase operates on the output of the previous phase, allowing compilers to achieve parallelism while subsequently optimizing memory access patterns to recover locality and enable vectorization.
2Loss of energy
If compilers optimize for memory locality, then memory bandwidth utilization improves, but parallelism is reduced
Solution Approach 1:
The patent implements dynamic optimization where the compiler analyzes the specific characteristics of each memory reference and applies transformations selectively. The system dynamically determines the optimal balance between parallelism and locality for each statement based on its access patterns, rather than applying fixed optimization rules that would compromise one for the other.
3Productivity
If compilers enforce constant-stride memory accesses, then vector unit utilization improves, but program flexibility and general parallelism are constrained
Solution Approach 1:
The patent introduces intermediate representations and transformation functions that act as mediators between the original program and the optimized code. These intermediaries enable the compiler to enforce constant-stride requirements for vectorization while preserving the original program's flexibility through reversible transformations and multiple optimization passes.
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 one vector execution unit that allow for parallel execution of tasks on constant-strided memory locations. The first custom computing apparatus optimizes the code for parallelism, locality of operations, constant-strided memory accesses and vectorized execution 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.


