Vector Width-Aware Compiler Synchronization Elision

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Vector processing systems face challenges in porting programs across different vector widths, leading to sub-optimal performance or incorrect execution, often requiring inefficient code with superfluous function calls and complex state consistency enforcement.

Innovation Solution

A compiler is configured to detect the vector width of the target system and compile programs to optimize for that width, automatically selecting appropriate functions, eliding superfluous function calls, and enforcing concurrency guarantees, thereby facilitating efficient execution on various vector widths.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronization operations (e.g., barrier operations) are included in vector processing code to ensure correctness across different vector widths, then reliability is improved, but productivity deteriorates due to unnecessary synchronization overhead

Engineering Contradiction:
Improvecorrectness of executionVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system changes the parameter of synchronization operation presence based on the vector width parameter. When vector width is sufficient to hold all work items, synchronization operations are eliminated. When vector width is insufficient, synchronization operations are included. This dynamic parameter adjustment resolves the contradiction between reliability and productivity.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The compilation process dynamically adapts the generated code based on the target system's vector width. The compiler generates different versions of the code with or without synchronization operations depending on the detected vector width, making the system adaptable to different hardware configurations while optimizing performance for each.

Inventive Principle:
Principle #15Dynamics

2Adaptability or versatility

If code is written to be portable across different vector widths, then adaptability is improved, but device complexity increases due to the need for width-contingent function calls and state consistency enforcement

Engineering Contradiction:
Improveportability across vector widthsVSAvoidcode complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The compiler performs preliminary analysis of the source code to identify width-contingent function calls and determines the appropriate vector width version before code generation. This preliminary action allows the system to handle adaptability automatically during compilation, preventing the need for complex runtime checks and manual width management in the executed code.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The compiler acts as an intermediary that translates high-level portable code into optimized width-specific code. It handles the complexity of width-contingent function calls and synchronization operations during compilation, allowing the source code to remain simple and portable while the compiler generates the appropriate complex handling for the target platform.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If superfluous function calls are included to ensure correctness on all vector widths, then reliability is improved, but productivity deteriorates due to unnecessary function call overhead

Engineering Contradiction:
Improvecorrectness of executionVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system extracts and removes superfluous function calls from the generated code based on the detected vector width. When the vector width is sufficient, the compiler identifies and eliminates unnecessary synchronization function calls, keeping only the essential ones required for correctness. This extraction process maintains reliability while improving productivity by removing overhead.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8966461B2Vector width-aware synchronization-elision for vector processors
Publication Date: 2015.02.24 ADVANCED MICRO DEVICES INC
  • US8966461B2 patent drawing
  • US8966461B2 patent drawing
  • US8966461B2 patent drawing

AI summary

A medium, method, and apparatus are disclosed for eliding superfluous function invocations in a vector-processing environment. A compiler receives program code comprising a width-contingent invocation of a function. The compiler creates a width-specific executable version of the program code by determining a vector width of a target computer system and omitting the function from the width-specific executable if the vector width meets one or more criteria. For example, the compiler may omit the function call if the vector width is greater than a minimum size.