Divergence Analysis for Pointer-Based GPU Programs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

GPU performance is degraded due to branch divergence in pointer-based programs, which has not been thoroughly addressed in existing divergence analysis methods.

Innovation Solution

A computer-implemented divergence analysis method for pointer-based programs is developed, utilizing an intermediate representation in gated single static assignment form, control flow graphs, and divergence relation graphs to identify divergent nodes and determine divergence, transforming the analysis into a directed acyclic graph to assess divergence.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If branch divergence occurs in pointer-based programs on GPUs, then different program paths are executed serially, but GPU performance degrades due to idle threads waiting

Engineering Contradiction:
ImproveGPU computational throughputVSAvoididle thread waiting time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the program analysis into distinct components: control flow graph construction, divergence relation graph construction, and directed acyclic graph transformation. This segmentation allows systematic identification of divergent branches in pointer-based programs, enabling targeted optimization of specific divergence points without affecting the entire program execution

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces intermediate representations (control flow graph, divergence relation graph, and directed acyclic graph) as mediators between the original pointer-based program and the divergence analysis results. These intermediate structures serve as bridges that facilitate the identification and analysis of branch divergence patterns, enabling performance optimization through systematic graph-based analysis

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If existing divergence analysis methods are applied to pointer-based programs, then general divergence detection is performed, but pointer-specific divergence patterns are not thoroughly addressed

Engineering Contradiction:
Improveapplicability of divergence analysisVSAvoiddivergence detection accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent applies local quality by designing analysis methods specifically tailored to pointer-based programs. The divergence relation graph construction incorporates pointer-specific semantics and memory access patterns, allowing the analysis to adapt to the unique characteristics of pointer-based code while maintaining precision in detecting pointer-induced branch divergence that general methods would miss

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9201636B2Method for divergence analysis of pointer-based program
Publication Date: 2015.12.01 NATIONAL TSING HUA UNIVERSITY
  • US9201636B2 patent drawing
  • US9201636B2 patent drawing
  • US9201636B2 patent drawing

AI summary

A method comprises generating an intermediate representation of a pointer-based program; providing a control flow graph of the intermediate representation; selecting an analysis candidate from the intermediate representation as a traced variable and a root node; determining a definition site of the trace variable according to a use-define chain and the control flow graph; defining a node for each definition site variable; defining an edge by using each definition site variable and the traced variable; using each definition site variable of the definition site as a traced variable; repeating the steps of determining a definition site, defining a node, defining an edge and using each definition site to obtain a divergence relation graph; transforming the divergence relation graph into a directed acyclic graph; and determining whether the analysis candidate is divergent or not according to a divergent node and the directed acyclic graph.