SIMD Lane PC Management for Control-Flow Divergence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing SIMD machines face challenges in efficiently running Single Program Multiple Data (SPMD) code with diverging control-flow due to the lack of a mechanism to manage multiple program counters across multiple data streams, leading to reduced performance and throughput.

Innovation Solution

A SIMD machine is optimized to run SPMD code by using a single thread-PC with lane-PCs and lane activation bits, incrementing lane depth counters at branch operations, and employing convergence and barrier instructions to manage divergent paths, maximizing active lanes and performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a single thread-PC is used to control instruction execution across multiple lanes, then device complexity is reduced, but control-flow divergence cannot be properly managed leading to performance degradation

Engineering Contradiction:
Improveprogram counter managementVSAvoidthroughput
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the single program counter into multiple lane-specific program counters (lane-PCs), one for each lane. This allows each lane to independently track its execution state while still being managed within the SIMD framework, resolving the conflict between simplicity and divergent control flow management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension to program counter management by adding lane depth counters that track the nesting level of branch operations for each lane. This dimensional addition enables the system to handle complex divergent control flows without sacrificing the efficiency of SIMD execution.

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

2Reliability

If lane depth counters are incremented at branch operations to track divergence, then control-flow convergence is improved, but device complexity increases

Engineering Contradiction:
Improvecontrol-flow convergenceVSAvoidcounter management mechanism
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent performs preliminary actions by incrementing lane depth counters at branch operations before the actual divergence occurs. This proactive tracking ensures that when convergence is needed, the system already has the information required to efficiently synchronize lanes without complex runtime analysis.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The lane depth counters provide continuous feedback about the divergence state of each lane. This feedback mechanism allows the SIMD machine to dynamically adjust its execution strategy, switching between synchronized and divergent execution modes based on the current state of lane depth counters.

Inventive Principle:
Principle #23Feedback

3Adaptability or versatility

If multiple lane-PCs are maintained for divergent execution paths, then control-flow divergence is properly handled, but device complexity increases

Engineering Contradiction:
Improvedivergent path managementVSAvoidprogram counter structure
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent merges the management of multiple lane-PCs into a unified SIMD control structure. Rather than implementing completely independent program counters for each lane, the system combines them under a single SIMD control unit that can efficiently switch between synchronized and divergent execution modes, reducing overall complexity.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent implements dynamic program counter management where lane-PCs are actively maintained only when needed for divergent execution. The system can dynamically switch between using single thread-PC for synchronized execution and multiple lane-PCs for divergent execution, optimizing resource usage based on runtime conditions.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10936323B2Optimize control-flow convergence on SIMD engine using divergence depth
Publication Date: 2021.03.02 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10936323B2 patent drawing
  • US10936323B2 patent drawing
  • US10936323B2 patent drawing

AI summary

There are provided a system, a method and a computer program product for selecting an active data stream (a lane) while running Single Program Multiple Data code on a Single Instruction Multiple Data machine. The machine runs an instruction stream over input data streams and machine increments lane depth counters of all active lanes upon the thread-PC reaching a branch operation and updates the lane-PC of each active lane according to targets of the branch operation. An instruction of the instruction stream includes a barrier indicating a convergence point for all lanes to join. In response to a lane reaching a barrier: evaluating whether all lane-PCs are set to a same thread-PC; and if the lane-PCs are not set to the same thread-PC, selecting an active lane from the plurality of lanes; otherwise, incrementing the lane-PCs of all the lanes, and then selecting an active lane from the plurality of lanes.