Tree-Based Thread Management for Divergent Path Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional thread management techniques in parallel processing architectures serialize divergent paths, leading to undesirable consequences such as program deadlocks and inefficient execution of instructions that depend on conditional conditions across threads.

Innovation Solution

A method employing a tree divergence table to manage threads, where divergent execution paths are handled by creating child nodes with separate program counters and instructions, allowing concurrent execution of divergent paths within a warp, thereby avoiding serialization and enabling parallel execution of divergent threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If divergent paths are serialized in conventional thread management, then program execution control is simplified, but execution speed deteriorates and deadlocks may occur

Engineering Contradiction:
Improvethread management complexityVSAvoidexecution speed
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the single warp execution context into multiple independent thread groups, each capable of following different execution paths simultaneously. Instead of serializing all threads in a warp through a single program counter, the system creates separate execution contexts for divergent paths, allowing parallel execution of multiple instruction streams within the same warp.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent adds a dimension of parallelism by enabling multiple program counters to exist simultaneously within a single warp. Rather than transitioning between paths sequentially in time, the system allows multiple paths to exist concurrently in parallel, effectively moving from a 1D sequential execution model to a 2D parallel execution model.

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

2Productivity

If divergent paths are executed in parallel, then execution speed improves, but thread management complexity increases

Engineering Contradiction:
Improveexecution speedVSAvoidthread management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements a hierarchical nested structure where thread groups are nested within warps, and each thread group has its own program counter nested within the warp-level execution context. This nesting allows the system to manage complexity at multiple levels simultaneously, with the warp level handling high-level coordination and thread group levels handling specific path execution.

Inventive Principle:
Principle #7Nested doll (Nesting)

Solution Approach 2:

The patent introduces intermediate control structures that mediate between the simple serialized model and the complex parallel model. These intermediaries manage the coordination between multiple parallel thread groups, handling synchronization and convergence points without requiring full complexity of managing all possible path combinations explicitly.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If a single program counter is used per warp, then hardware implementation is simplified, but conditional instructions cause deadlocks

Engineering Contradiction:
Improvehardware implementation complexityVSAvoidprogram execution reliability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent merges multiple program counters into a unified warp execution context, allowing the hardware to treat multiple independent execution paths as a single coordinated entity. This merging enables conditional instructions to be evaluated and executed across all thread groups simultaneously rather than causing serialization or deadlock, while maintaining relatively simple hardware implementation.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS9830161B2Tree-based thread management
Publication Date: 2017.11.28 NVIDIA CORP
  • US9830161B2 patent drawing
  • US9830161B2 patent drawing
  • US9830161B2 patent drawing

AI summary

In one embodiment of the present invention, a streaming multiprocessor (SM) uses a tree of nodes to manage threads. Each node specifies a set of active threads and a program counter. Upon encountering a conditional instruction that causes an execution path to diverge, the SM creates child nodes corresponding to each of the divergent execution paths. Based on the conditional instruction, the SM assigns each active thread included in the parent node to at most one child node, and the SM temporarily discontinues executing instructions specified by the parent node. Instead, the SM concurrently executes instructions specified by the child nodes. After all the divergent paths reconverge to the parent path, the SM resumes executing instructions specified by the parent node. Advantageously, the disclosed techniques enable the SM to execute divergent paths in parallel, thereby reducing undesirable program behavior associated with conventional techniques that serialize divergent paths across thread groups.