Tensor Splitting for Consistent Dynamic and Static Graph Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The inconsistency in execution results between dynamic and static computation graphs in deep learning frameworks leads to resource wastage and reduced utilization due to repeated adjustments and executions, especially in distributed parallel training frameworks.
Innovation Solution
A tensor processing method that determines consistent conversion functions for input tensors across different types of computation graphs, ensuring the same split state is achieved regardless of dynamic or static execution, thereby maintaining consistent results and avoiding resource wastage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the deep learning framework uses different execution logic for dynamic graph and static graph, then the framework can support both types of computation graphs, but the execution results become inconsistent
Solution Approach 1:
The patent introduces a unification module that acts as an intermediary between dynamic graph and static graph execution paths. This module standardizes the tensor splitting operation by determining conversion functions based on computation logic and source split states, ensuring that both graph types produce consistent target input tensors and thus consistent execution results
Solution Approach 2:
The patent changes the execution parameters by determining conversion functions with constant relevant information for target input tensors regardless of graph type. By standardizing parameters such as split states and conversion functions, the system achieves consistent execution results while maintaining support for both dynamic and static computation graphs
2Reliability
If the computation graph is repeatedly adjusted and executed to ensure consistency, then the execution results become consistent, but the processing resources are wasted
Solution Approach 1:
The patent performs preliminary determination of conversion functions and their relevant information before actual graph execution. By pre-establishing the tensor splitting rules and conversion functions based on computation logic and source split states, the system ensures consistency in a single execution without requiring repeated adjustments, thus avoiding resource wastage
Solution Approach 2:
The system achieves self-consistency by automatically determining conversion functions with constant relevant information for target input tensors. The unification module autonomously ensures consistent execution results across different graph types without requiring external intervention or repeated execution, eliminating resource waste from manual adjustments
3Adaptability or versatility
If the deep learning framework uses different execution logic for dynamic graph and static graph, then the framework can handle both graph types, but the resource utilization is reduced
Solution Approach 1:
The patent creates a universal conversion function determination mechanism that serves both dynamic graph and static graph execution paths. The unification module determines conversion functions with constant relevant information regardless of graph type, enabling a single standardized process to handle both graph types efficiently, thus improving resource utilization while maintaining adaptability
Solution Approach 2:
The patent segments the execution logic into distinct components: the unification module that determines conversion functions, the tensor splitting operation, and the distributed parallel communication. By segmenting and standardizing the conversion function determination, the system achieves efficient resource utilization while supporting both graph types
Data Source
AI summary
Provided is a tensor processing method, an electronic device, and a storage medium, relating to the fields of deep learning and artificial intelligence. The method includes: determining relevant information of a conversion function corresponding to each of one or more target input tensors of a first operator in a target computation graph based on computation logic of the first operator and source split states of at least part of source input tensors of the first operator; splitting each source input tensor of the first operator based on the relevant information of the conversion function corresponding to each target input tensor to obtain each target input tensor; and sending each target input tensor to a plurality of computing devices. The plurality of computing devices are configured to perform distributed parallel communication based on each target input tensor and the first operator, to obtain an output tensor of the first operator.


