Vectorization of Loops Using Vector Masks and Distance Arrays

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods struggle to efficiently vectorize computer code with backward cross-iteration dependencies, as conventional approaches fail to accurately predict output values and memory locations, leading to inefficient processing and resource usage.

Innovation Solution

The process involves analyzing the iterative computer code to identify and preserve cross-iteration dependencies, allowing each vector chunk to execute speculatively and update values based on previous chunks, using a vector mask and distance arrays to optimize conditional loop execution and reduce unused value generation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional vectorization methods are used on loops with backward cross-iteration dependencies, then vectorized execution is attempted, but the output values and memory locations cannot be accurately predicted

Engineering Contradiction:
Improvevectorized execution efficiencyVSAvoidprediction accuracy of output values
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent performs preliminary analysis of the loop structure and dependency patterns before vectorization. It identifies backward cross-iteration dependencies and determines safe vectorization boundaries in advance, allowing the system to generate accurate predictions of output values and memory locations while maintaining vectorized execution efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent incorporates feedback mechanisms that verify predicted output values against actual loop execution results. When discrepancies are detected, the system adjusts its vectorization strategy and prediction models, improving accuracy for subsequent vectorized executions while maintaining high productivity.

Inventive Principle:
Principle #23Feedback

2Speed

If speculative execution of vector chunks is enabled, then parallel execution speed increases, but additional processing is required to update values from previous chunks

Engineering Contradiction:
Improveparallel execution speedVSAvoidprocessing complexity for updating values
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent divides the iterative loop into discrete vector chunks that can be executed speculatively in parallel. Each chunk is independently analyzed for dependencies, allowing faster parallel execution while managing update complexity through structured segmentation of the computation workflow.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces intermediary data structures and transformation mechanisms that facilitate efficient updating of values between speculative vector chunks. These intermediaries handle the complexity of dependency resolution and value propagation, reducing the overall processing complexity while maintaining high parallel execution speed.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If vector masks and distance arrays are used to optimize conditional loop execution, then resource usage is optimized, but the vectorization process becomes more complex

Engineering Contradiction:
Improveresource usage efficiencyVSAvoidvectorization process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent transforms loop conditions and iteration parameters into vector mask representations and distance arrays. This parameter transformation enables optimized resource usage by allowing vectorized conditional execution and efficient skipping of irrelevant iterations, while the systematic approach to transformation manages the associated complexity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11853757B2Vectorization of loops based on vector masks and vector count distances
Publication Date: 2023.12.26 INTEL CORP
  • US11853757B2 patent drawing
  • US11853757B2 patent drawing
  • US11853757B2 patent drawing

AI summary

Systems, apparatuses and methods may provide for technology that identifies that an iterative loop includes a first code portion that executes in response to a condition being satisfied, generates a first vector mask that is to represent one or more instances of the condition being satisfied for one or more values of a first vector of values, and one or more instances of the condition being unsatisfied for the first vector of values, where the first vector of values is to correspond to one or more first iterations of the iterative loop, and conducts a vectorization process of the iterative loop based on the first vector mask.