Graph Compilation Dependency Transformation for Parallel Execution
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Productivity
If parallel execution of branch threads is implemented, then the execution efficiency is improved, but the control dependency management becomes more complex
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.
3Adaptability or versatility
If control dependencies are transformed into data dependencies, then parallel execution is enabled, but the transformation process increases compilation 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.
Data Source
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.


