Workitem Synchronization via Program Counter Tracking

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 divergent control flows, leading to inefficiencies and deadlocks in heterogeneous computing systems.

Innovation Solution

The method involves storing and tracking program counters for each workitem to enable flexible synchronization and rescheduling across divergent control flows, allowing for the execution of multiple instruction multiple data (MIMD) style applications on SIMD processors by selecting workitems based on their program counters and synchronization/convergence status.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional barrier synchronization is used in OpenCL, then workitems can be synchronized at a single point, but synchronization fails when control flow diverges between workitems

Engineering Contradiction:
Improvesynchronization reliabilityVSAvoidcontrol flow adaptability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent segments the workgroup into multiple subgroups based on program counter values, allowing each subgroup to be synchronized independently at different code locations. This enables reliable synchronization across divergent control flows by treating workitems with different execution paths as separate entities that can be managed independently.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension of control by tracking program counter values and using them to dynamically organize workitems into subgroups. This adds a program-counter-based dimension to the traditional workgroup concept, enabling synchronization at multiple code locations rather than a single barrier point.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If workitems are forced to synchronize at a single barrier point, then synchronization is simple to implement, but processing efficiency decreases due to idle waiting

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidsynchronization complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

By segmenting workgroups into subgroups based on program counter values, the patent allows different subgroups to proceed at different rates without forcing all workitems to wait at a single barrier. This eliminates idle waiting and improves processing efficiency while maintaining synchronization where needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent makes the workgroup structure dynamic by allowing workitems to be reorganized into different subgroups based on their program counter values. This dynamic reorganization enables efficient progression of workitems that are ready while keeping those not ready in their current subgroup, avoiding unnecessary waiting.

Inventive Principle:
Principle #15Dynamics

3Reliability

If all workitems in a workgroup must reach a barrier before proceeding, then synchronization is guaranteed, but deadlock occurs when some workitems have divergent control flow and cannot reach the barrier

Engineering Contradiction:
Improvesynchronization guaranteeVSAvoidprogramming flexibility
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent segments the workgroup into subgroups based on program counter values, allowing workitems with divergent control flow to be synchronized at different code locations. This prevents deadlock by enabling workitems that cannot reach a particular barrier to be synchronized at alternative locations appropriate to their execution path.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces program counter tracking as an intermediary mechanism that mediates between divergent control flows and synchronization requirements. By using program counter values to organize subgroups, the system can guarantee synchronization for each subgroup without requiring all workitems to reach every barrier, thus preventing deadlock.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Adaptability or versatility

If traditional SIMD execution model is used, then hardware mask sets can simulate threading, but MIMD style applications cannot be effectively executed

Engineering Contradiction:
Improveapplication type supportVSAvoidexecution model complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent adds a program-counter-based dimension to the traditional SIMD execution model, allowing workitems to be organized into subgroups based on their execution state. This enables MIMD-style applications to be executed on SIMD hardware by creating virtual execution contexts through program counter tracking and subgroup management.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

By segmenting the workgroup into subgroups based on program counter values, the patent creates multiple independent execution contexts within the SIMD hardware. This allows MIMD-style applications with divergent control flows to be executed effectively by treating each subgroup as a separate execution context that can follow different instruction sequences.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9424099B2Method and system for synchronization of workitems with divergent control flow
Publication Date: 2016.08.23 ADVANCED MICRO DEVICES INC
  • US9424099B2 patent drawing
  • US9424099B2 patent drawing
  • US9424099B2 patent drawing

AI summary

Disclosed methods, systems, and computer program products embodiments include synchronizing a group of workitems on a processor by storing a respective program counter associated with each of the workitems, selecting at least one first workitem from the group for execution, and executing the selected at least one first workitem on the processor. The selecting is based upon the respective stored program counter associated with the at least one first workitem.