Dynamic Wavefront Repacking for GPU Branch Divergence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current graphics processing units (GPUs) face inefficiencies due to branch divergence, where not all threads in a wavefront follow the same branch, leading to reduced throughput and wasted 'thread space' as only active threads execute, resulting in decreased SIMD unit efficiency.

Innovation Solution

Dynamic wavefronts are repacked during program code execution by determining compaction and reconvergence points, allowing threads following the same control path to be grouped together, using a compaction table and reconvergence stack to synchronize and maximize thread activity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If wavefronts are repacked to maximize thread activity, then GPU throughput is improved, but device complexity increases

Engineering Contradiction:
ImproveGPU throughputVSAvoidwavefront management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by pre-identifying and storing compaction points and reconvergence points in data structures (compaction tables and reconvergence stacks) before executing the repacking operation. This allows the GPU to efficiently determine when and how to repack wavefronts without complex real-time analysis, thereby improving throughput while managing complexity through pre-computed information.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces intermediary data structures (compaction tables and reconvergence stacks) that mediate between the branch divergence problem and the wavefront repacking solution. These intermediaries store information about control flow convergence points, enabling the system to repack wavefronts effectively without requiring complex direct analysis of all thread paths, thus resolving the contradiction between throughput improvement and complexity management.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If dynamic wavefront repacking is implemented, then branch divergence efficiency is improved, but manufacturing precision requirements increase

Engineering Contradiction:
Improvebranch execution efficiencyVSAvoidthread grouping accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system uses feedback mechanisms by monitoring thread execution paths and identifying when all threads in a wavefront have reached compaction points or when reconvergence points are achieved. This feedback information is stored in the compaction tables and reconvergence stacks, allowing the system to accurately determine when repacking should occur, thereby ensuring high thread grouping accuracy while improving branch execution efficiency.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent replaces complex mechanical-like thread synchronization mechanisms with data structure-based information storage and retrieval. Instead of using complex hardware mechanisms to track and synchronize thread convergence, the system uses software-managed compaction tables and reconvergence stacks to store and retrieve convergence point information, achieving accurate thread grouping with reduced manufacturing precision requirements.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS9898287B2Dynamic wavefront creation for processing units using a hybrid compactor
Publication Date: 2018.02.20 ADVANCED MICRO DEVICES INC
  • US9898287B2 patent drawing
  • US9898287B2 patent drawing
  • US9898287B2 patent drawing

AI summary

A method, a non-transitory computer readable medium, and a processor for repacking dynamic wavefronts during program code execution on a processing unit, each dynamic wavefront including multiple threads are presented. If a branch instruction is detected, a determination is made whether all wavefronts following a same control path in the program code have reached a compaction point, which is the branch instruction. If no branch instruction is detected in executing the program code, a determination is made whether all wavefronts following the same control path have reached a reconvergence point, which is a beginning of a program code segment to be executed by both a taken branch and a not taken branch from a previous branch instruction. The dynamic wavefronts are repacked with all threads that follow the same control path, if all wavefronts following the same control path have reached the branch instruction or the reconvergence point.