GPU Memory Management for Machine Learning Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Machine learning performance on GPUs is bottlenecked by unnecessary memory allocation for data objects that persist even after they are no longer needed, leading to inefficiencies and performance degradation due to memory migration between GPU and system memory.

Innovation Solution

A system and method for memory management that utilizes a no reuse detector to identify and deallocate data objects by generating a dependency structure, counting dependencies, and deallocating objects when their tasks are completed, thereby optimizing memory usage during machine learning training on GPUs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If memory is allocated for data objects during machine learning training, then computations can be performed, but memory pressure increases and performance degrades when data objects are no longer needed

Engineering Contradiction:
Improvemachine learning performanceVSAvoidmemory usage
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The system performs preliminary actions by allocating memory for data objects before they are needed for computation, and then proactively deallocates them after their tasks are completed. The memory management system tracks task completion and initiates deallocation in advance of potential memory pressure, preventing performance degradation before it occurs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements discarding and recovering by deallocating data objects after their computational tasks are completed. The system tracks which data objects are no longer needed and recovers their memory allocation, making it available for other computations. This cyclic process of allocation, usage, and recovery optimizes memory utilization throughout the training process.

Inventive Principle:
Principle #34Discarding and recovering

2Speed

If data objects remain allocated in GPU memory, then quick access is available, but memory pressure increases causing migration to system memory

Engineering Contradiction:
Improvememory access speedVSAvoidGPU memory capacity
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The memory management system dynamically adjusts memory allocation based on real-time computational needs. It continuously monitors task completion and data object usage, deallocating memory when objects are no longer needed and reallocating when needed. This dynamic approach maintains optimal memory access speed while preventing GPU memory overflow that would force migration to slower system memory.

Inventive Principle:
Principle #15Dynamics

3Quantity of substance

If memory is deallocated too early, then memory pressure is reduced, but computations may fail due to premature deallocation

Engineering Contradiction:
Improvememory pressureVSAvoidcomputation completion
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The system implements feedback mechanisms by tracking the computational dependencies and task completion status of data objects. Before deallocating memory, the system verifies that all tasks requiring the data object have completed. This feedback loop ensures reliable computation completion while enabling timely deallocation to reduce memory pressure.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces an intermediary memory management system that acts as a mediator between computational tasks and data object memory allocation. This intermediary tracks task completion, manages deallocation timing, and ensures that memory is released only after all dependent tasks are complete. It maintains both reliable computation and optimized memory pressure through coordinated management.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11468312B2Memory management for machine learning training on GPU
Publication Date: 2022.10.11 SAMSUNG ELECTRONICS CO LTD
  • US11468312B2 patent drawing
  • US11468312B2 patent drawing
  • US11468312B2 patent drawing

AI summary

A system and method for memory management. In one embodiment, the method includes generating a dependency structure comprising one or more task identifiers and one or more data object identifiers. The dependency structure includes a list of one or more dependencies for a first data object identifier of the one or more data object identifiers, a first dependency of the list identifying a first task for which a data object identified by the first data object identifier is an input. The method further includes counting the number of dependencies for the first data object identifier, decrementing the count by one when the first task completes execution, and, when the count reaches zero, deallocating the first data object.