Adaptive Mini-Batch Reuse for GPU Training Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The bandwidth limitations of communications buses between Central Processing Units (CPUs) and Graphics Processing Units (GPUs) hinder the performance of deep learning applications, as conventional methods require frequent and resource-intensive data movement and discarding of mini-batches during neural network training.

Innovation Solution

Implementing adaptive batch reuse by prefetching and reusing mini-batches on the GPU, adjusting a reuse count based on validation errors to determine when to increment or decrement reuse, thereby reducing data movement and energy consumption while optimizing neural network training.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If mini-batches are frequently transferred from CPU to GPU during neural network training, then training can proceed with fresh data, but data movement bandwidth becomes the limiting factor reducing overall system performance

Engineering Contradiction:
Improvetraining speedVSAvoidenergy consumption
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system performs preliminary actions by prefetching multiple mini-batches to GPU memory before they are needed for training. This allows the GPU to have data ready in advance, eliminating waiting time and reducing the frequency of CPU-GPU data transfers, thereby lowering energy consumption while maintaining training speed

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of discarding mini-batches after a single use, the system recovers and reuses them multiple times in GPU memory. This recovery and reuse approach reduces the need for repeated data transfers from CPU to GPU, significantly reducing energy consumption associated with data movement while maintaining productive training operations

Inventive Principle:
Principle #34Discarding and recovering

2Loss of energy

If mini-batches are reused multiple times in GPU memory, then data movement and energy consumption are reduced, but the risk of overfitting increases

Engineering Contradiction:
Improveenergy consumptionVSAvoidgeneralization capability
Core Design Contradiction:
Loss of energyVSReliability

Solution Approach 1:

The system dynamically adjusts the reuse count of mini-batches based on training progress and validation performance. The reuse count is not fixed but adapts during training, allowing the system to optimize the balance between energy efficiency and generalization capability by adjusting how many times each mini-batch is reused before being discarded

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system implements feedback mechanisms where validation performance is monitored to determine the optimal reuse count. If validation accuracy plateaus or degrades, the system adjusts the reuse count downward to prevent overfitting, while still maintaining energy-efficient operation by reusing batches within the optimized limit

Inventive Principle:
Principle #23Feedback

3Loss of energy

If the reuse count is increased to reduce CPU-GPU communication, then energy consumption decreases, but validation error may increase indicating overfitting

Engineering Contradiction:
Improveenergy consumptionVSAvoidvalidation error
Core Design Contradiction:
Loss of energyVSMeasurement precision

Solution Approach 1:

The reuse count is made dynamic rather than static, adjusting automatically based on validation error feedback. When validation error increases indicating overfitting, the reuse count is reduced; when validation error is acceptable, the reuse count can be increased to maximize energy efficiency, creating a dynamic optimization loop

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the reuse count parameter adaptively during training based on performance metrics. By monitoring validation error and adjusting the reuse count parameter accordingly, the system finds the optimal balance point where energy consumption is minimized without compromising generalization capability

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12039450B2Adaptive batch reuse on deep memories
Publication Date: 2024.07.16 ADVANCED MICRO DEVICES INC
  • US12039450B2 patent drawing
  • US12039450B2 patent drawing
  • US12039450B2 patent drawing

AI summary

A method of adaptive batch reuse includes prefetching, from a CPU to a GPU, a first plurality of mini-batches comprising a subset of a training dataset. The GPU trains the neural network for the current epoch by reusing, without discard, the first plurality of mini-batches in training the neural network for the current epoch based on a reuse count value. The GPU also runs a validation set to identify a validation error for the current epoch. If the validation error for the current epoch is less than a validation error of a previous epoch, the reuse count value is incremented for a next epoch. However, if the validation error for the current epoch is greater than a validation error of a previous epoch, the reuse count value is decremented for the next epoch.