Speculative Vectorisation Apparatus for Inter-Lane Memory Hazard Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern SIMD architectures face limitations in memory alias analysis and data dependencies, restricting the ability to safely vectorise code regions and thereby limiting performance improvements due to unknown or periodic inter lane memory hazards.

Innovation Solution

An apparatus and method that employs speculative vectorisation using processing circuitry, tracking storage, checking circuitry, and replay determination circuitry to detect and handle inter lane memory hazards, allowing for selective re-execution of affected lanes and enabling the vectorisation of scalar memory access operations that were previously not vectorisable.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If speculative vectorisation is applied to scalar memory access operations, then performance is improved through parallel processing, but inter lane memory hazards may occur causing incorrect results

Engineering Contradiction:
ImproveperformanceVSAvoidcorrectness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent performs preliminary tracking of memory addresses accessed by each lane before execution completes. By recording which lanes access which memory addresses in advance, the system can proactively identify potential inter-lane memory hazards and trigger selective replay of only the affected lanes, rather than waiting for errors to manifest.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a feedback mechanism where the results of speculative vectorisation are monitored for memory hazards. When inter-lane memory hazards are detected through the tracking information, the system feeds this information back to trigger selective replay of the identified lanes, ensuring correctness while maintaining the performance benefits of speculative execution for non-hazardous lanes.

Inventive Principle:
Principle #23Feedback

2Productivity

If whole regions of code are vectorised, then performance improvement is maximised, but memory alias analysis limitations prevent safe vectorisation

Engineering Contradiction:
Improveperformance improvementVSAvoidcompiler complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces tracking storage as an intermediary mechanism between the compiler and the vector execution units. This tracking storage records memory address information for each lane, enabling the system to safely vectorise entire code regions without requiring the compiler to perform complex memory alias analysis, as the hazard detection is deferred to runtime through the tracking mechanism.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical/compiler-based memory alias analysis with a hardware-based tracking and detection system. Instead of relying on the compiler to statically determine whether vectorisation is safe, the system uses runtime tracking of memory addresses and hardware-assisted detection of inter-lane hazards, substituting complex compiler analysis with simpler runtime mechanisms.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Reliability

If selective replay is implemented for lanes with memory hazards, then correctness is maintained, but overhead is introduced

Engineering Contradiction:
ImprovecorrectnessVSAvoidreplay overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies local quality by implementing selective replay only for the specific lanes that are determined to have inter-lane memory hazards, rather than replaying all lanes. The tracking information enables precise identification of affected lanes, so only those localised to the hazard are re-executed, minimising the overall replay overhead while maintaining correctness.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the parameter of replay scope from all-or-nothing to selective based on hazard detection. By using tracking information to identify which lanes accessed conflicting memory addresses, the system can adjust the replay parameter to include only the necessary lanes, reducing the time loss associated with replay while ensuring correctness for the affected operations.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12131155B2Apparatus and method for speculatively vectorising program code
Publication Date: 2024.10.29 ARM LTD
  • US12131155B2 patent drawing
  • US12131155B2 patent drawing
  • US12131155B2 patent drawing

AI summary

An apparatus and method are provided for speculatively vectorising program code. The apparatus includes processing circuitry for executing program code, the program code including an identified code region comprising at least a plurality of speculative vector memory access instructions. Execution of each speculative vector memory access instruction is employed to perform speculative vectorisation of a series of scalar memory access operations using a plurality of lanes of processing. Tracking storage is used to maintain, for each speculative vector memory access instruction, tracking information providing an indication of a memory address being accessed within each lane. Checking circuitry then references the tracking information during execution of the identified code region by the processing circuitry, in order to detect any inter lane memory hazard resulting from the execution of the plurality of speculative vector memory access instructions.