Vector Instruction Result Prediction via Micro-Operation Speculation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing DLP processors face challenges in vectorizing loops due to dependencies between iterations, which limits the performance benefits of parallelism and requires extensive manual recoding, hindering their widespread adoption for general-purpose applications.

Innovation Solution

A processor that predicts the result of Actual instructions using a prediction micro-operation, generating a predicted result vector and executing subsequent instructions speculatively, while recording prediction accuracy and switching to actual results when necessary, allowing dynamic exploitation of parallelism at runtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If DLP processors are used to exploit data-level parallelism, then processing speed is improved, but device complexity increases and ease of operation deteriorates due to requiring manual recoding

Engineering Contradiction:
Improveprocessing speedVSAvoidease of operation
Core Design Contradiction:
SpeedVSEase of operation

Solution Approach 1:

The patent applies preliminary action by having the compiler insert prediction instructions and generate predicted result vectors before actual execution. The compiler performs static analysis to identify loop-carried dependencies and inserts appropriate prediction instructions that will generate predicted results in advance, eliminating the need for manual recoding while enabling speculative execution at runtime.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses prediction instructions and predicted result vectors as intermediaries between the original program code and the vector processing unit. These intermediaries allow the processor to speculate on loop results without requiring manual recoding of the application, bridging the gap between high-level code and low-level vector operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If loop vectorization is attempted to improve performance, then productivity is improved, but reliability deteriorates due to loop-carried data dependencies and memory-address aliasing

Engineering Contradiction:
ImproveproductivityVSAvoidreliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by performing static analysis during compilation to identify potential dependencies and inserting prediction instructions before execution. This allows the system to prepare predicted result vectors in advance that account for potential loop-carried dependencies and memory-address aliasing, enabling safe speculative execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses feedback by comparing predicted result vectors with actual results after execution. The system monitors prediction accuracy and uses this feedback to determine whether to trust predicted results or fall back to actual computed results, thereby maintaining reliability while improving productivity through speculative execution.

Inventive Principle:
Principle #23Feedback

3Loss of time

If speculative execution is used to improve performance by predicting loop results, then loss of time is reduced, but measurement precision deteriorates due to need to verify predicted results

Engineering Contradiction:
Improveloss of timeVSAvoidmeasurement precision
Core Design Contradiction:
Loss of timeVSMeasurement precision

Solution Approach 1:

The patent applies partial action by using prediction instructions for only those loop iterations and dependencies that can be statically analyzed and predicted with high confidence. The system performs partial vectorization where applicable, using predicted results for safe iterations while maintaining precise computation for iterations with uncertain dependencies, thus reducing time loss without sacrificing measurement precision.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9098295B2Predicting a result for an actual instruction when processing vector instructions
Publication Date: 2015.08.04 APPLE INC
  • US9098295B2 patent drawing
  • US9098295B2 patent drawing
  • US9098295B2 patent drawing

AI summary

The described embodiments provide a processor that executes vector instructions. In the described embodiments, while dispatching instructions at runtime, the processor encounters an Actual instruction. Upon determining that a result of the Actual instruction is predictable, the processor dispatches a prediction micro-operation associated with the Actual instruction, wherein the prediction micro-operation generates a predicted result vector for the Actual instruction. The processor then executes the prediction micro-operation to generate the predicted result vector. In the described embodiments, when executing the prediction micro-operation to generate the predicted result vector, if the predicate vector is received, for each element of the predicted result vector for which the predicate vector is active, otherwise, for each element of the predicted result vector, generating the predicted result vector comprises setting the element of the predicted result vector to true.