Eliminating Partial-Redundant Vector Loads in Compiler Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current compiler optimization techniques, such as partial redundancy elimination, are ineffective in eliminating partial-redundant vector loads, which occur when only a portion of vector elements overlap, leading to inefficient performance in vectorized code, particularly in stencil computations used in scientific and engineering applications.

Innovation Solution

The method involves detecting and replacing groups of partial-redundant vector loads with a smaller set of non-redundant or reduced-redundant vector loads by grouping vector operations based on common characteristics, applying transformation limitations, and using instructions like (V)PALIGN* to reduce memory accesses, thereby optimizing code performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If vectorization is enabled to process multiple data elements in parallel, then execution speed is improved, but memory access redundancy increases leading to performance degradation

Engineering Contradiction:
Improveexecution speedVSAvoidmemory access redundancy
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The patent extracts and eliminates redundant vector load operations from the code. The optimization technique identifies partial-redundant vector loads where only some elements are actually needed, and removes the unnecessary load operations, keeping only the essential memory accesses required for correct execution.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameters of vector operations by introducing vector shuffle operations and modifying load patterns. Instead of loading complete vectors when only partial data is needed, the optimization transforms the code to load smaller amounts of data and use vector shuffle instructions to rearrange elements, thereby reducing memory bandwidth consumption.

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If partial-redundant vector loads are executed to maintain simplicity in code structure, then ease of operation is preserved, but productivity decreases due to inefficient memory accesses

Engineering Contradiction:
Improvecode simplicityVSAvoidexecution efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent introduces dynamic optimization by analyzing runtime characteristics of vector operations. The system dynamically identifies patterns of partial redundancy and applies different optimization strategies based on the specific characteristics of each vector load operation, adapting the code transformation to the actual usage patterns.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces vector shuffle operations as intermediary steps between memory loads and computational operations. These shuffle operations act as mediators that rearrange vector elements to match the actual data requirements, allowing the compiler to eliminate redundant loads while maintaining correct program semantics.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If multiple vector loads are performed to ensure data availability, then reliability is improved, but loss of time increases due to redundant memory accesses

Engineering Contradiction:
Improvedata availabilityVSAvoidmemory access time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary analysis of vector operations to identify which elements will actually be used in subsequent computations. By determining the exact data requirements in advance, the optimization can pre-load only the necessary elements, avoiding redundant memory accesses that would waste time without providing any benefit to data availability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10268454B2Methods and apparatus to eliminate partial-redundant vector loads
Publication Date: 2019.04.23 INTEL CORP
  • US10268454B2 patent drawing
  • US10268454B2 patent drawing
  • US10268454B2 patent drawing

AI summary

Methods, apparatus, systems and articles of manufacture are disclosed to eliminate partial-redundant vector load operations. An example apparatus includes a node grouper to associate a vector operation with a node group, a candidate verifier to perform a dependencies test on a subset of the node group, and identify a subset of the node group as a candidate when the subset satisfies the dependencies test, and a code optimizer to determine replacement code based on a characteristic of the candidate in the node group and compare an estimated cost associated with executing the replacement code to a threshold. The example apparatus also includes a code generator to generate machine code using the replacement code when the estimated cost of executing the replacement code satisfies the threshold.