GPU Video Memory Optimization for Deep Learning Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecomputing unit utilizationVSAvoidvideo memory occupancy
Core Design Contradiction:
ProductivityVSQuantity of substance

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #15Dynamics

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

Engineering Contradiction:
Improvevideo memory occupancyVSAvoidcomputing unit utilization
Core Design Contradiction:
Quantity of substanceVSProductivity

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #3Local quality

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

Engineering Contradiction:
Improvetraining completionVSAvoidtraining speed
Core Design Contradiction:
ReliabilityVSSpeed

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.

Inventive Principle:
Principle #16Partial or excessive action

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.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12205025B2Processor memory optimization method and apparatus for deep learning training tasks
Publication Date: 2025.01.21 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US12205025B2 patent drawing
  • US12205025B2 patent drawing
  • US12205025B2 patent drawing

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.