Partial Data Type Promotion for Microprocessor Vectorization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional compilers limit the number of calculations a processor can perform by promoting all mixed data type elements to the highest data type, which reduces the number of elements that can be stored in a register and increases clock cycles, hindering efficient vectorization in microprocessors.

Innovation Solution

A compiler is configured to detect vectorizable loops and perform partial data type promotion, allowing calculations to be done using intermediate data types, thereby optimizing the compilation process and improving vectorization performance by enabling more elements to be stored in a register.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If all mixed data type elements are promoted to the highest data type, then calculation accuracy is improved, but the number of elements that can be stored in a register decreases and clock cycles increase

Engineering Contradiction:
Improvecalculation accuracyVSAvoidvectorization performance
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies local quality by promoting data types selectively rather than uniformly. Different elements in the same expression can be promoted to different intermediate data types based on their specific requirements, allowing some elements to use smaller data types (saving register space) while others use larger data types (maintaining accuracy where needed).

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the data type parameter from a fixed highest type to variable intermediate types. The compiler determines appropriate intermediate data types for each element based on the expression context, enabling flexible adjustment between precision and register capacity to optimize vectorization performance.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If full data type promotion is performed, then program correctness is maintained, but execution time increases due to more clock cycles

Engineering Contradiction:
Improveprogram correctnessVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by performing data type promotion only where necessary for correctness rather than universally. The compiler identifies which elements require promotion to maintain program correctness and applies promotion selectively, avoiding unnecessary promotion overhead and reducing execution time.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent introduces intermediate data types as mediators between the original mixed data types and the final result type. These intermediate types allow calculations to proceed with appropriate precision while enabling better vectorization, and the results are subsequently converted to the final required type.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Stability of the object's composition

If all elements are promoted to the highest data type, then data type consistency is improved, but the number of calculations the processor can perform decreases

Engineering Contradiction:
Improvedata type consistencyVSAvoidnumber of calculations
Core Design Contradiction:
Stability of the object's compositionVSProductivity

Solution Approach 1:

The patent segments the data type promotion process into multiple stages with different intermediate types rather than applying a single highest data type to all elements. This segmentation allows different parts of the expression to use different data type sizes, increasing the total number of elements that can be processed in parallel.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent makes the data type selection dynamic rather than static. The compiler analyzes the expression and dynamically determines the appropriate intermediate data type for each element based on operational requirements, enabling flexible optimization between consistency and computational capacity.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11740880B2Partial data type promotion to exploit efficient vectorization in microprocessors
Publication Date: 2023.08.29 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11740880B2 patent drawing
  • US11740880B2 patent drawing
  • US11740880B2 patent drawing

AI summary

Aspects of the invention include a compiler detecting an expression in a loop that includes elements of mixed data types. The compiler then promotes elements of a sub-expression of the expression to a same intermediate data type. The compiler then calculates the sub-expression using the elements of the same intermediate data type.