Dynamic Barrier Width Calculation for Data Parallel Thread Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In data parallel processing, traditional barrier operations require all threads to wait for each other to finish their write operations before proceeding to read operations, leading to inefficiencies, especially when not all threads' results are necessary for subsequent operations.

Innovation Solution

Dynamic barrier width calculation allows a subset of threads to proceed with read operations after executing barrier operations, even if other threads have not, by determining a barrier width smaller than the total number of threads, enabling more efficient synchronization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional barrier operations synchronize all threads in a block, then data correctness is ensured, but execution efficiency deteriorates due to unnecessary waiting

Engineering Contradiction:
Improvedata correctnessVSAvoidexecution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The barrier operation is segmented into multiple width levels, where each width level corresponds to a subset of threads that need to synchronize. Instead of requiring all threads in a block to wait at a barrier, the system divides threads into groups and applies barrier operations with appropriate widths to each group, allowing threads that have completed their write operations to proceed without waiting for other threads that do not contribute to subsequent read operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different threads within the same block are treated differently based on their specific synchronization needs. The system calculates and applies different barrier widths for different thread groups, allowing each group to proceed at its own pace based on when it completes its write operations and when it needs the data. This local differentiation eliminates the need for all threads to wait for the slowest thread.

Inventive Principle:
Principle #3Local quality

2Productivity

If barrier width is reduced to allow subset of threads to proceed, then execution efficiency improves, but data correctness may deteriorate

Engineering Contradiction:
Improveexecution efficiencyVSAvoiddata correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback mechanisms to track the completion status of write operations and the readiness status of read operations. By monitoring which threads have completed their writes and which threads need to read data, the system dynamically determines the appropriate barrier width. This feedback ensures that barrier operations are configured to maintain data correctness while allowing maximum parallelism.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The barrier width parameter is dynamically changed based on the specific synchronization requirements of each operation. Instead of using a fixed barrier width for all threads, the system calculates optimal barrier widths for different thread groups based on their write completion status and read requirements. This parameter adaptation allows the system to maintain correctness while improving efficiency.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3964951A1Barrier synchronization with dynamic width calculation
Publication Date: 2022.03.09 QUALCOMM INC
  • EP3964951A1 patent drawingFigure 1
  • EP3964951A1 patent drawingFigure 2
  • EP3964951A1 patent drawingFigure 3

AI summary

A sequencer of a processing unit determines, at runtime, a barrier width of a barrier operation for a group threads, wherein the barrier width is smaller than a total number of threads in the group of threads, and wherein threads in the group of threads execute data parallel code on one or more compute units. In response to each thread in a subgroup of the group of threads having executed the barrier operation, the subgroup including a same number of threads as the barrier width, the sequencer may enable the subgroup of the group of threads to execute on the one or more processors past the barrier operation without waiting for other threads in the group of threads to execute the barrier operation, wherein the subgroup of the group of threads is smaller than the total number of threads in the group of threads.