Barrier Skip Instruction for Workitem Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional workitem synchronization models, such as those in OpenCL, are inadequate for handling dynamic behavior and divergence in CPU-associated applications, leading to inefficiencies and potential deadlocks, especially when workitems have different execution paths.

Innovation Solution

The introduction of a barrier skip instruction allows workitems to permanently leave a synchronization group, reducing the need for all workitems to reach a barrier, and a barrier reset instruction reconfigures the barrier for reuse, enabling flexible and efficient synchronization without deadlocks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional barrier synchronization is used in OpenCL, then workitems can be synchronized within a workgroup, but all workitems must reach the barrier before any can proceed, leading to deadlocks when workitems have divergent execution paths

Engineering Contradiction:
Improvesynchronization correctnessVSAvoidprocessing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The barrier synchronization mechanism is made dynamic by allowing workitems to conditionally participate or skip barriers based on runtime conditions. The barrier instruction is enhanced to accept a condition parameter, enabling workitems to dynamically decide whether to wait at a barrier based on their execution state, thus avoiding deadlocks while maintaining synchronization where needed.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Different workitems within the same workgroup are allowed to have different synchronization behaviors. Instead of forcing all workitems to follow the same barrier protocol, the invention enables individual workitems to selectively participate in barrier synchronization based on their local execution conditions, allowing divergent paths while maintaining correctness for those that do synchronize.

Inventive Principle:
Principle #3Local quality

2Adaptability or versatility

If barrier instructions are placed inside conditional statements, then flexible control flow is enabled, but conventional barriers require all workitems to enter the conditional to reach the barrier, limiting flexibility

Engineering Contradiction:
Improvecontrol flow flexibilityVSAvoidsynchronization model complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The barrier instruction is enhanced to accept a condition parameter that allows different workitems to have different barrier participation behavior. This enables barriers to be placed inside conditional statements without requiring all workitems to enter the conditional, as each workitem can independently evaluate the condition and decide whether to participate in the barrier synchronization.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The barrier synchronization model is made dynamic by allowing the barrier participation to be conditionally determined at runtime. The enhanced barrier instruction evaluates conditions dynamically for each workitem, enabling flexible control flow where workitems can selectively participate in barriers based on their execution path without increasing overall system complexity.

Inventive Principle:
Principle #15Dynamics

3Reliability

If all workitems in a workgroup must reach a barrier for synchronization, then correct synchronization is ensured, but workitems with divergent execution paths are blocked indefinitely, causing deadlocks

Engineering Contradiction:
Improvesynchronization correctnessVSAvoidworkitem blocking time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The synchronization behavior is made local to each workitem's execution state. Instead of requiring all workitems to reach a barrier, the enhanced barrier instruction allows individual workitems to conditionally participate based on their local conditions. Workitems with divergent paths can skip barriers they don't need, avoiding indefinite blocking while maintaining synchronization correctness for workitems that do participate.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The barrier synchronization is made dynamic by allowing workitems to conditionally participate based on runtime evaluation. The enhanced barrier instruction enables workitems to dynamically determine their participation based on their execution path, allowing those with divergent paths to skip unnecessary barriers and avoid deadlocks while maintaining correctness for those that need to synchronize.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentEP2774037B1Method and system for workitem synchronization
Publication Date: 2019.09.25 ADVANCED MICRO DEVICES INC
  • EP2774037B1 patent drawingFigure 1A~1B
  • EP2774037B1 patent drawingFigure 1C~1D
  • EP2774037B1 patent drawingFigure 2A

AI summary

Method, system, and computer program product embodiments for synchronizing workitem s on one or more processors are disclosed. The embodiments include executing a barrier skip instruction by a first workitem from the group, and responsive to the executed banier skip instruction, reconfiguring a barrier to synchronize other workitems from the group in a plurality of points in a sequence without requiring the first workitem to reach the barrier in any of the plurality of points.