Polyhedral Compiler Optimization for Multi-Core Memory Locality

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveoptimization effectivenessVSAvoidcompiler complexity
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvememory bandwidthVSAvoidmemory access inefficiency
Core Design Contradiction:
Quantity of substanceVSObject-affected harmful factors

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #35Parameter changes

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

Engineering Contradiction:
Improvecomputational powerVSAvoidexecution coordination complexity
Core Design Contradiction:
PowerVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #23Feedback

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

Engineering Contradiction:
Improveoptimization qualityVSAvoidcompilation time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

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.

Inventive Principle:
Principle #35Parameter changes

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.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS8930926B2System, methods and apparatus for program optimization for multi-threaded processor architectures
Publication Date: 2015.01.06 QUALCOMM INC
  • US8930926B2 patent drawing
  • US8930926B2 patent drawing
  • US8930926B2 patent drawing

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.