Data Speculation Extension Hardware for Loop Vectorization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Vectorizing loops with possible cross-iteration dependences is challenging due to the difficulty in ensuring safe execution, particularly when the compiler lacks knowledge about the addresses or alignment of arrays, leading to potential ordering violations and mis-speculation.

Innovation Solution

The introduction of Data Speculation Extension (DSX) hardware and new instructions that allow for speculative execution of memory operations, where each loop iteration is executed speculatively, and hardware assists in address checks, using special instructions to convey loop position information and stride to reconstruct scalar memory ordering, thereby preventing mis-speculation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the compiler vectorizes loops without a priori knowledge about addresses or alignment, then productivity is improved through parallel execution, but reliability deteriorates due to potential ordering violations and mis-speculation

Engineering Contradiction:
Improveloop execution speedVSAvoidexecution correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces preliminary actions (YBEGIN, YEND instructions and address tracking) before and after speculative execution to establish and verify ordering constraints. The compiler generates these preliminary actions to track memory addresses and detect ordering violations, ensuring that vectorized loops maintain correct execution order even without a priori knowledge of address alignment.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback mechanisms through address tracking hardware that monitors memory access patterns during speculative execution. The system provides feedback about ordering violations to the processor, which can then adjust execution accordingly. This feedback loop enables the system to maintain reliability while exploiting parallel execution for improved productivity.

Inventive Principle:
Principle #23Feedback

2Reliability

If hardware performs extensive address checks for every memory operation, then reliability is improved by preventing mis-speculation, but device complexity increases

Engineering Contradiction:
Improvespeculation accuracyVSAvoidhardware structure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality by implementing address tracking selectively rather than universally. The YBEGIN/YEND instructions and address tracking are applied locally to specific speculative regions where ordering violations are possible, rather than to all memory operations system-wide. This localized approach maintains reliability where needed while minimizing hardware complexity.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent segments the memory access verification process into distinct phases: speculative execution phase (where ordering may be violated) and verification phase (where address tracking checks ordering). This segmentation allows the system to perform extensive checking only when necessary, reducing overall hardware complexity while maintaining reliability.

Inventive Principle:
Principle #1Segmentation

3Reliability

If the compiler generates conservative scalar code to ensure correctness, then reliability is maintained, but productivity decreases due to lost parallelism opportunities

Engineering Contradiction:
Improveexecution safetyVSAvoidexecution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces dynamics by allowing the execution mode to switch between scalar and vectorized based on runtime conditions. The compiler generates vectorized code with embedded YBEGIN/YEND instructions, and the hardware dynamically determines whether to execute speculatively or conservatively based on address tracking results. This dynamic approach enables the system to achieve high productivity when parallelism is safe while maintaining reliability when needed.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10387156B2Systems, apparatuses, and methods for data speculation execution
Publication Date: 2019.08.20 INTEL CORP
  • US10387156B2 patent drawing
  • US10387156B2 patent drawing
  • US10387156B2 patent drawing

AI summary

Systems, methods, and apparatuses for data speculation execution (DSX) are described. In some embodiments, a hardware apparatus for performing DSX comprises a hardware decoder to decode an instruction, the instruction to include an opcode, and execution hardware to execute the decoded instruction to continue a data speculative execution (DSX) and to determine that a DSX loop iteration is to be committed, commit speculative stores associated with the DSX loop iteration, and start a new DSX loop iteration.