SIMD Thread Resume Counter for Divergent Branch Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Multi-threaded processing systems face challenges in handling divergent threads, particularly when conditional branch instructions lead to asynchronous execution, hindering synchronous processing and increasing processing time due to the need for incremental cycling through program counter values.

Innovation Solution

The techniques involve deactivating threads based on divergent branch conditions, setting resume counters for reactivation, and using minimum resume counters to improve performance by selecting appropriate program counter values for forward jump and branch instructions, ensuring orderly processing and reducing processing time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Stability of the object's composition

If incremental cycling through program counter values is used to handle divergent threads, then threads are processed in order, but processing time increases

Engineering Contradiction:
Improvethread execution orderVSAvoidprocessing time
Core Design Contradiction:
Stability of the object's compositionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-calculating and storing resume counter values for each thread at the point of divergence. When a divergent branch is encountered, the system immediately loads the appropriate resume counter value into the program counter, eliminating the need for incremental cycling. This allows the system to jump directly to the correct instruction address for each thread, maintaining execution order while significantly reducing processing time.

Inventive Principle:
Principle #10Preliminary action

2Stability of the object's composition

If threads are deactivated based on divergent branch conditions, then synchronous processing is maintained, but device complexity increases

Engineering Contradiction:
Improvesynchronous processingVSAvoidprocessing system complexity
Core Design Contradiction:
Stability of the object's compositionVSDevice complexity

Solution Approach 1:

The patent applies segmentation by dividing the thread management into distinct components: active threads that continue execution and inactive threads that are deactivated. Each thread has its own resume counter value that is independently managed. This segmentation allows the system to maintain synchronous processing by deactivating only the necessary threads while keeping others active, without requiring complex coordination mechanisms across all threads.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces resume counter values as intermediary structures that mediate between the divergent branch condition and the program counter. These resume counter values serve as pre-calculated instruction addresses that the control unit can directly load, acting as an intermediary that simplifies the complexity of managing divergent threads while maintaining synchronous processing semantics.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If resume counter values are set for each deactivated thread, then thread reactivation is precise, but loss of information increases

Engineering Contradiction:
Improvethread reactivation precisionVSAvoidsystem state information
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The patent applies copying by creating and storing resume counter values that are copies of the program counter values at the point of divergence. These resume counter values are pre-calculated and stored in a data structure, allowing the system to precisely reactivate threads at the correct instruction address without needing to maintain complex state information about each thread's execution path. The resume counter acts as a compact copy of the necessary reactivation information.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8832417B2Program flow control for multiple divergent SIMD threads using a minimum resume counter
Publication Date: 2014.09.09 QUALCOMM INC
  • US8832417B2 patent drawing
  • US8832417B2 patent drawing
  • US8832417B2 patent drawing

AI summary

This disclosure describes techniques for handling divergent thread conditions in a multi-threaded processing system. In some examples, a control flow unit may obtain a control flow instruction identified by a program counter value stored in a program counter register. The control flow instruction may include a target value indicative of a target program counter value for the control flow instruction. The control flow unit may select one of the target program counter value and a minimum resume counter value as a value to load into the program counter register. The minimum resume counter value may be indicative of a smallest resume counter value from a set of one or more resume counter values associated with one or more inactive threads. Each of the one or more resume counter values may be indicative of a program counter value at which a respective inactive thread should be activated.