Graph Compilation Dependency Transformation for Parallel Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computational graph compilation technologies fail to analyze the dependency relationship among tensor variables of different branch threads from a global perspective, preventing parallel execution of branch threads in the global computational graph.

Innovation Solution

An intermediate representation method and apparatus that compiles neural networks into computational graphs, defines branch states and dependency relationships, builds data and control dependency graphs, and transforms control dependencies into data dependencies to enable parallel execution of branch threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing computational graph compilation technology is used, then the compilation process is simple, but the dependency relationship among tensor variables of different branch threads cannot be analyzed from a global perspective

Engineering Contradiction:
Improvedependency relationship analysis accuracyVSAvoidcompilation system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the computational graph analysis into two distinct dependency graphs: data dependency relationship graph and control dependency relationship graph. This segmentation allows comprehensive analysis of tensor variable dependencies across different branch threads while maintaining manageable system complexity through modular graph structures.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediate representation layer that transforms control dependencies into data dependencies. This intermediary transformation enables global perspective analysis of dependency relationships without requiring direct complex control flow analysis, resolving the contradiction between analysis accuracy and system complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If parallel execution of branch threads is implemented, then the execution efficiency is improved, but the control dependency management becomes more complex

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcontrol dependency management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent replaces complex control dependency management mechanisms with a simplified data dependency-based approach. By transforming control dependencies into data dependencies in the intermediate representation, the system achieves parallel execution efficiency without the overhead of complex control flow management, as the data dependency graph naturally captures all necessary synchronization points.

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

3Adaptability or versatility

If control dependencies are transformed into data dependencies, then parallel execution is enabled, but the transformation process increases compilation complexity

Engineering Contradiction:
Improveparallel execution capabilityVSAvoidtransformation process complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent performs the control-to-data dependency transformation as a preliminary action during the compilation phase, before parallel execution begins. This preliminary transformation embeds all necessary parallel execution information into the data dependency graph structure, enabling straightforward parallel execution without requiring complex runtime transformation logic.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11782723B1Intermediate representation method and apparatus for parallel execution of graph computation
Publication Date: 2023.10.10 SHANGHAI ENFLAME TECH CO LTD
  • US11782723B1 patent drawing
  • US11782723B1 patent drawing
  • US11782723B1 patent drawing

AI summary

Disclosed are an intermediate representation method and apparatus for parallel execution of graph computation. The method includes the following steps: S1: compiling a neural network into a computational graph on a computer; S2: defining branch states of tensor variables in the computational graph; S3: defining a data dependency relationship of the tensor variables in the computational graph; S4: defining a control dependency relationship of the tensor variables in the computational graph; S5: building a data dependency relationship graph of the tensor variables in the computational graph; S6: building a control dependency relationship graph of the tensor variables in the computational graph; and S7: transforming control dependencies into data dependencies. The present application derives, based on the dependency relationship, a parallel computing method that can execute the branch threads in parallel in the global computational graph, and optimizes the compilation efficiency of the computational graph.