SIMD Data Layout Selection via Compile-Time Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current SIMD processors face inefficiencies in data processing due to the lack of dynamic format selection, leading to suboptimal performance in parallel processing tasks, as they often rely on pre-defined memory layouts that do not adapt to the specific characteristics of the algorithm being executed.

Innovation Solution

A method and apparatus that dynamically select a suitable data format (such as AoS or SoA) for a SIMD processor by predicting performance based on the algorithm's characteristics, generating binary code, and executing it using the selected format to maximize processing power.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a pre-defined memory layout is used in SIMD processors, then the implementation is simple and fixed, but the processing performance is suboptimal because it cannot adapt to different algorithm characteristics

Engineering Contradiction:
Improveprocessing performanceVSAvoiddata format selection complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements dynamic data layout selection by allowing the processor to switch between different data formats (AoS, SoA, and hybrid formats) based on the characteristics of the algorithm being executed. The compiler analyzes the source code and selects the optimal data format for each function, enabling the system to adapt to different processing scenarios rather than being fixed to a single layout.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the data format parameter (memory layout structure) based on algorithm characteristics. By analyzing function prologues and epilogues, the compiler determines whether to use AoS, SoA, or hybrid data formats, thereby optimizing memory access patterns and processing performance for different computational tasks.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If dynamic data layout transformation is implemented at runtime, then processing performance can be optimized, but the system complexity increases due to bookkeeping code and runtime conversions

Engineering Contradiction:
Improveparallel processing efficiencyVSAvoidruntime conversion overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent performs data layout optimization at compile time rather than runtime. The compiler analyzes the source code, identifies function characteristics, and pre-determines the optimal data format for each function. This preliminary action eliminates the need for runtime bookkeeping code and dynamic layout conversions, reducing runtime overhead while maintaining optimization benefits.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical runtime conversion system with a compile-time analysis system. Instead of using bookkeeping code to dynamically transform layouts at runtime, the compiler generates optimized binary code with predetermined data layouts, substituting runtime mechanical transformations with static compile-time decisions.

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

3Adaptability or versatility

If multiple data formats are supported, then adaptability to different algorithms is improved, but the selection process becomes more complex

Engineering Contradiction:
Improvealgorithm compatibilityVSAvoidperformance prediction complexity
Core Design Contradiction:
Adaptability or versatilityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies different data formats to different parts of the code based on local algorithm characteristics. By analyzing function prologues and epilogues, the compiler determines the appropriate data format for each specific function, allowing local optimization rather than applying a single global format to the entire program.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent incorporates feedback mechanisms where the compiler analyzes function characteristics (prologue and epilogue patterns) and uses this information to select appropriate data formats. The system measures algorithm characteristics and feeds this information back into the compilation process to make informed format selection decisions.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP2698707B1A method and compilation apparatus for selecting a data layout providing the optimum performance for a target processor using a SIMD scheme
Publication Date: 2016.05.25 SAMSUNG ELECTRONICS CO LTD
  • EP2698707B1 patent drawingFigure 1
  • EP2698707B1 patent drawingFigure 2~3
  • EP2698707B1 patent drawingFigure 4

AI summary

A method and compilation apparatus for selecting a data layout, from among a plurality of data formats supported by an execution apparatus used to execute a binary code, providing the optimum performance for a target processor using SIMD scheme. The compilation apparatus contains analyzers generating a binary code for a particular data layout. A comparator compares the generated binary codes and selects the most performant one. The data layouts can be scalars, structure of arrays or array of structures. The execution apparatus may execute the binary code provided by the compilation apparatus.