Tree Divergence Table for Parallel Thread Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional thread management techniques in parallel processing units serialize divergent paths, leading to undesirable consequences such as program deadlocks and distortion of software application semantics, as they execute only a single path per warp, preventing certain threads from progressing.
Innovation Solution
A method that uses a tree divergence table to manage threads by creating nodes for divergent execution paths, allowing subsets of threads to execute different instructions concurrently, thereby avoiding serialization of divergent paths and enabling parallel execution of divergent paths.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If a hardware-based call return stack is used to manage thread execution in a push-pop manner, then thread execution can be simplified and hardware resources are utilized efficiently, but divergent execution paths are serialized which causes program deadlocks and distorts software application semantics
Solution Approach 1:
The patent segments the thread management approach by introducing a tree divergence table that divides the execution paths into multiple parallel branches. Instead of serializing all threads through a single call return stack, the system creates separate execution paths for different threads based on conditional instructions, allowing them to execute in parallel without blocking each other.
Solution Approach 2:
The patent transitions from a one-dimensional linear execution model (single call return stack) to a multi-dimensional tree structure. The tree divergence table organizes threads in a hierarchical manner with multiple levels of divergence, enabling parallel execution across different branches while maintaining synchronization points where needed.
2Productivity
If only a single execution path is maintained per warp using conventional stack management, then hardware resources are optimized and execution is simplified, but certain threads may never satisfy conditions and the program deadlocks
Solution Approach 1:
The patent introduces dynamic execution path management where the system can adaptively create multiple execution paths based on conditional instructions. The tree divergence table dynamically branches execution paths when conditions differ among threads, allowing each thread to progress independently through different routes rather than being forced through a single serialized path.
3Ease of manufacture
If divergent paths are serialized across each warp, then thread management is simplified and hardware implementation is easier, but the semantics of the original software application are distorted and forward progress is gated
Solution Approach 1:
The patent introduces a tree divergence table as an intermediary data structure between the hardware execution units and the software thread management. This intermediary enables the hardware to efficiently manage threads while preserving software semantics by providing a structured way to track and synchronize threads across divergent paths without forcing serialization.
Data Source
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.


