Compiler Collectivity Analysis for UPC Barrier Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The runtime performance of Unified Parallel C (UPC) programs is impacted by the execution of barrier statements, as existing technologies require checking each barrier invocation to ensure consistency across threads, leading to unnecessary runtime overhead.

Innovation Solution

A compiler determines whether a named barrier is matched across all threads and replaces it with an unnamed barrier, leveraging collectivity analysis to prove that all threads execute the same number of barrier invocations, thereby eliminating the need for diagnostic checks and reducing processing resources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If named barriers are used in UPC programs to ensure synchronous execution across threads, then execution correctness is maintained, but runtime overhead increases due to diagnostic checks

Engineering Contradiction:
Improveexecution correctnessVSAvoidruntime overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The compiler performs collectivity analysis during compilation to determine in advance whether all threads execute the same barrier invocations. This preliminary analysis allows the compiler to eliminate unnecessary diagnostic checks at runtime, resolving the contradiction by preparing optimization information before execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The invention replaces named barriers with unnamed barriers when collectivity is proven. The unnamed barrier is a simplified copy that eliminates the naming overhead and diagnostic message generation, while maintaining the same synchronization function, thus reducing runtime overhead without sacrificing correctness.

Inventive Principle:
Principle #26Copying

2Reliability

If diagnostic checks are performed on each barrier invocation to ensure consistency, then execution safety is maintained, but processing resources are consumed

Engineering Contradiction:
Improveexecution safetyVSAvoidprocessing resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The compiler performs collectivity analysis during the compilation phase to determine whether all threads execute identical barrier invocations. This preliminary determination allows the elimination of runtime diagnostic checks, transferring the verification work to compilation time when processing resources are more efficiently utilized.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The invention extracts the barrier optimization opportunity from runtime execution and moves it to compile time through collectivity analysis. By separating the verification function from the barrier execution, the diagnostic checks are eliminated at runtime while maintaining execution safety through compiler-generated optimizations.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If named barriers with diagnostic messages are used, then thread synchronization correctness is verified, but computing efficiency decreases

Engineering Contradiction:
Improvesynchronization correctnessVSAvoidcomputing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The compiler performs collectivity analysis during compilation to preliminarily determine whether all threads execute the same barrier invocations. This advance determination allows the replacement of named barriers with optimized unnamed barriers, eliminating diagnostic message overhead and improving computing efficiency while preserving synchronization correctness.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The invention uses unnamed barriers as simplified copies of named barriers when collectivity is proven. These copied barriers maintain the essential synchronization function while eliminating the diagnostic message generation and naming overhead, thus improving computing efficiency without compromising synchronization correctness.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8856763B2Compiler optimization based on collectivity analysis
Publication Date: 2014.10.07 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8856763B2 patent drawing
  • US8856763B2 patent drawing
  • US8856763B2 patent drawing

AI summary

An embodiment is directed to determining, by a compiler, that a call to a named barrier is matched across all of a plurality of threads, and based at least in part on determining that the call to the named barrier is matched across all of the plurality of threads, replacing, by the compiler, the named barrier with an unnamed barrier.