GPU Video Memory Optimization for Deep Learning Training
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Deep learning model training tasks face challenges in optimizing GPU video memory, leading to low utilization rates of computing units and potential training failures due to storage overflow.
Innovation Solution
A processor video memory optimization method and apparatus that determine an optimal path for transferring computing results between computing units, avoiding video memory occupation and swaps, thereby enhancing training speed and preventing storage overflow.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the batch size is increased to improve computing unit utilization, then the quantity of tasks increases, but the video memory becomes heavily occupied and training cannot be completed
Solution Approach 1:
The patent segments the video memory management into multiple computing units (first computing unit, second computing unit, intermediate computing units) and implements differential path selection for each. Different computing results are transferred through different paths based on their characteristics, allowing fine-grained control over video memory occupancy while maintaining high computing unit utilization.
Solution Approach 2:
The patent dynamically selects between two paths (first path with direct transfer, second path with swap operation) based on real-time video memory state and computing result characteristics. This dynamic adaptation allows the system to optimize between computing unit utilization and video memory occupancy during the training process.
2Quantity of substance
If video memory swap operations are performed to reduce video memory occupancy, then storage overflow is avoided, but the utilization rate of computing units decreases
Solution Approach 1:
The patent introduces intermediate computing units as mediators between the first computing unit and the second computing unit. These intermediate units buffer and manage data flow, allowing swap operations to be performed without directly impacting the utilization of primary computing units. The intermediate units absorb the overhead of swap operations while maintaining efficient data transfer.
Solution Approach 2:
The patent applies different quality levels of path selection to different computing results based on their local characteristics. Some computing results use the fast direct path (first path) while others use the swap path (second path), optimizing the overall system performance by matching path characteristics to data requirements rather than applying a uniform approach.
3Reliability
If swap operations are added to handle peak video memory occupancy, then training failure is avoided, but training speed is reduced due to overhead
Solution Approach 1:
The patent implements swap operations partially - only for specific computing results that require it, rather than applying swap operations universally. By selectively applying swap operations only where necessary (based on video memory state and result characteristics), the system maintains training reliability while minimizing the overhead that would reduce training speed.
Solution Approach 2:
The patent performs preliminary analysis of video memory state and computing result characteristics before deciding whether to use swap operations. This preliminary assessment allows the system to prepare appropriate transfer paths in advance, avoiding the performance penalty of ad-hoc swap operations during critical training phases.
Data Source
AI summary
The present application discloses a processor video memory optimization method and apparatus for deep learning training tasks, and relates to the technical field of artificial intelligence. In the method, by determining an optimal path for transferring a computing result, the computing result of a first computing unit is transferred to a second computing unit by using the optimal path. Thus, occupying the video memory is avoided, and meanwhile, a problem of low utilization rate of the computing unit of a GPU caused by video memory swaps is avoided, so that training speed of most tasks is hardly reduced.


