Predicated Vector Hazard Check Instruction for Runtime Dependency Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The adoption of DLP processors is hindered by the challenge of vectorizing loops in program code due to dependencies between iterations, such as loop-carried data dependencies and memory-address aliasing, which cannot be fully resolved by compilers until runtime data is available, preventing effective parallelism.

Innovation Solution

A processor implements hazard check instructions that identify dependencies between vector memory operations, using a dependency vector to control execution and ensure that dependencies are respected while maximizing parallelism through predication, allowing for dynamic adaptation of vector length based on runtime conditions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Difficulty of detecting and measuring

If the compiler performs static analysis to identify dependencies, then dependency detection is improved, but the ability to vectorize loops is worsened because runtime dependencies cannot be resolved

Engineering Contradiction:
Improvedependency detectionVSAvoidloop vectorization capability
Core Design Contradiction:
Difficulty of detecting and measuringVSAdaptability or versatility

Solution Approach 1:

The compiler performs preliminary static analysis to identify potential dependencies and generates code that prepares for runtime hazard checking. The hazard check instruction is pre-generated with the necessary operands to check dependencies at runtime, allowing the compiler to optimize code while preserving the ability to handle runtime-dependent scenarios.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces dynamic hazard checking at runtime to determine actual data dependencies between vector memory operations. The hazard check instruction dynamically compares addresses of vector elements to identify dependencies that may not be apparent from static analysis alone, enabling adaptive vectorization decisions based on actual runtime conditions.

Inventive Principle:
Principle #15Dynamics

2Speed

If vector memory operations are executed in parallel, then processing speed is improved, but dependency violations occur when memory addresses alias

Engineering Contradiction:
Improveprocessing speedVSAvoiddependency respect
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The hazard check instruction provides feedback about data dependencies between vector memory operations. By checking whether addresses of vector elements alias and identifying dependency relationships, the feedback mechanism enables the processor to adjust execution ordering or prevent parallel execution when dependencies would be violated, thus maintaining reliability while maximizing parallelism.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent applies different execution strategies to different elements of vectors based on their dependency characteristics. Elements that do not have dependencies can be processed in parallel, while elements with dependencies require sequential execution. This local differentiation allows optimal performance for each element while maintaining overall system reliability.

Inventive Principle:
Principle #3Local quality

3Reliability

If the compiler conservatively avoids vectorization to ensure correctness, then reliability is improved, but productivity is worsened due to limited parallelism

Engineering Contradiction:
Improveexecution correctnessVSAvoidloop execution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The compiler performs preliminary analysis to identify potential vectorization opportunities and generates code with hazard check instructions prepared in advance. This allows the compiler to optimistically vectorize loops while maintaining the ability to fall back to sequential execution if runtime dependency checks fail, thus achieving both high productivity and reliability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameter of dependency detection from purely static to a combination of static and runtime dynamic checking. By introducing hazard check instructions that operate at runtime, the system can adaptively determine whether vectorization is safe, allowing aggressive vectorization strategies that maintain both correctness and performance.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9928069B2Predicated vector hazard check instruction
Publication Date: 2018.03.27 APPLE INC
  • US9928069B2 patent drawing
  • US9928069B2 patent drawing
  • US9928069B2 patent drawing

AI summary

A hazard check instruction has operands that specify addresses of vector elements to be read by first and second vector memory operations. The hazard check instruction outputs a dependency vector identifying, for each element position of the first vector corresponding to the first vector memory operation, which element position of the second vector that the element of the first vector depends on (if any). In an embodiment, the addresses of the vector memory operations are specified using a base address for each vector memory operation and a vector that is shared by both vector memory operations. In an embodiment, the operands may include predicates for one or both of the vector memory operations, indicating which vector elements are active. The dependency vector may be qualified by the predicates, indicating dependencies only for active elements.