Control Flow Handling in Data-Parallel Architectures

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for handling control flow structures in data-parallel architectures face limitations, such as high overhead in predication for complex structures and limited efficiency due to divergent PC (DPC) units in branching approaches, which affect performance in multithreaded processors like GPUs.

Innovation Solution

A method that combines predication and branching by determining the innermost convergent regions with the highest divergent depth for predication, using free predication to avoid warp register spillage and selectively applying predication to regions based on scalar register pressure, thereby improving performance by optimizing the use of both software-based and hardware-based solutions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If predication is applied to complex control flow structures, then execution speed is improved, but register overhead increases and register spillage occurs

Engineering Contradiction:
Improveexecution speedVSAvoidregister overhead
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent segments control flow structures into different types (mergeable vs. non-mergeable) and applies different handling strategies to each. Mergeable control flow structures are handled through predication with lane mask merging, while non-mergeable structures use traditional branching. This segmentation allows predication to be applied selectively to reduce overhead rather than universally, thus improving speed without excessive register overhead.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies predication partially - only to mergeable control flow structures where it is beneficial, rather than applying it excessively to all control flow structures. By identifying and selectively predating only those structures that can merge lane masks efficiently, the system achieves speed improvement without incurring register spillage from over-predication.

Inventive Principle:
Principle #16Partial or excessive action

2Ease of manufacture

If branching is used to handle control flow structures, then implementation simplicity is maintained, but performance is limited due to divergent PC units

Engineering Contradiction:
Improveimplementation simplicityVSAvoidperformance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent combines predication and branching into a hybrid approach. Mergeable control flow structures use predication to improve performance by eliminating DPC unit requirements, while non-mergeable structures continue to use branching for implementation simplicity. This merging of two approaches allows the system to achieve high performance where possible while maintaining simplicity where predication would be problematic.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent applies different quality characteristics to different parts of the control flow handling system. For mergeable control flow structures, it applies the high-performance predication mechanism. For non-mergeable structures, it maintains the simple branching mechanism. This local differentiation optimizes performance for suitable cases while preserving implementation simplicity for cases where predication would be complex.

Inventive Principle:
Principle #3Local quality

3Productivity

If predication is applied to all control flow structures, then execution efficiency is improved, but warp register pressure increases causing register spillage

Engineering Contradiction:
Improveexecution efficiencyVSAvoidwarp register pressure
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent segments control flow structures into mergeable and non-mergeable categories, applying predication only to the mergeable segment. This segmentation prevents the excessive accumulation of warp register pressure that would occur if predication were applied universally, while still achieving execution efficiency improvement in the appropriate segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies predication partially - only to the extent necessary and beneficial for mergeable control flow structures. By avoiding predication on non-mergeable structures, the system prevents excessive warp register pressure accumulation and associated register spillage, while maintaining execution efficiency where predication is effective.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12056490B2Methods and systems for handling control flow structures in data-parallel architectures
Publication Date: 2024.08.06 HUAWEI TECH CO LTD
  • US12056490B2 patent drawing
  • US12056490B2 patent drawing
  • US12056490B2 patent drawing

AI summary

Methods, systems and apparatus are provided for handling control flow structures in data-parallel architectures. A method includes receiving, by a processing unit (PU), a program for execution. The method further includes applying, by the PU, a branching solution to the program to obtain data on control flow structures of the program. The method further includes determining, by the PU and based at least in part on the obtained data, one or more control flow structures of the program to predicate. The method further includes applying, by the PU, predication to the one or more control flow structures of the program.