Compiler Tensor Checkpoint Optimization in Dataflow Computing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing compilers for data parallel and dataflow applications face challenges in efficiently allocating computing system hardware resources, particularly in recomputing or checkpointing tensor data in neural networks.
Innovation Solution
A compiler method that determines recompute nodes and checkpoint tensors in dataflow applications, calculates recompute and memory costs, and compares solution costs to a threshold to decide between recomputing or checkpointing tensor data, optimizing resource allocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If tensor data is checkpointed in memory, then memory cost increases, but recompute cost decreases
Solution Approach 1:
The system dynamically determines whether to checkpoint or recompute tensor data based on real-time analysis of computational graphs and resource availability. The compiler evaluates multiple possible execution paths and selects the optimal strategy for each tensor operation, adapting the checkpointing approach to the specific characteristics of the neural network being executed.
Solution Approach 2:
The system changes the parameter of tensor data representation by transforming it into a compact format suitable for checkpointing. By modifying how tensor data is stored and represented in memory, the system reduces the memory cost associated with checkpointing while maintaining the ability to recover and recompute data when needed.
2Productivity
If more tensor data is checkpointed, then memory usage increases, but overall computation time decreases
Solution Approach 1:
The system segments the neural network computational graph into distinct regions and identifies specific tensor operations that benefit from checkpointing. Rather than checkpointing all tensor data uniformly, the compiler selectively applies checkpointing to critical paths and operations where it provides the most benefit to computation throughput.
Solution Approach 2:
The system applies partial checkpointing by selecting only the essential tensor data that needs to be preserved for optimal computation. The compiler analyzes the computational dependencies and checkpoints only the minimum necessary data required to maintain computation flow, avoiding excessive memory usage while still improving overall productivity.
3Reliability
If recompute strategy is used, then computational performance improves, but resource utilization worsens
Solution Approach 1:
The system incorporates feedback mechanisms where the compiler analyzes the actual execution characteristics and resource consumption patterns of the neural network. Based on this feedback, the system adjusts the checkpointing and recompute strategies to optimize the balance between computational performance and resource utilization, preventing excessive resource consumption while maintaining reliability.
Data Source
AI summary
According to a computing method a compiler determines a recompute node included in a dataflow application and a checkpoint tensor produced by the recompute node. The compiler determines a recompute cost to recompute the checkpoint tensor, and a memory cost to checkpoint the checkpoint tensor in a memory. Based on the recompute cost and/or the memory cost, the compiler determines a solution cost and compares the solution cost to a solution threshold. Based on comparing the solution cost to the solution threshold, the compiler determines a checkpoint solution to execute the dataflow application. The checkpoint solution can comprise recomputing or checkpointing the checkpoint tensor. In some implementations, the compiler can determine a recompute ratio of the recompute cost to the memory cost and can compare the recompute ratio to the solution threshold. A computer program product and a computing system can implement aspects of the method.


