GPU Multistream Memory Reuse for Fragmentation-Aware Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The limited capacity of graphics memories in GPUs restricts the efficiency of large-scale computing tasks, such as deep learning, despite their high bandwidth, necessitating improved methods to utilize memory resources effectively.

Innovation Solution

A graphics memory reuse method and apparatus based on GPU multistream concurrency, where at least two GPU streams are concurrently executed, allowing for the determination and allocation of reusable graphics memory blocks from a pool, with modes like default and multi-stream reuse to optimize memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If graphics memory capacity is increased to support large-scale computing tasks, then the ability to handle large models and samples improves, but the cost and complexity of the GPU system increases

Engineering Contradiction:
Improvegraphics memory capacityVSAvoidGPU system complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent merges multiple small graphics memory blocks from different streams into a unified graphics memory pool, allowing efficient utilization of fragmented memory resources. This combining approach enables large-scale computing tasks to be supported without requiring a single large memory capacity, thus avoiding increased hardware complexity and cost.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The graphics memory pool serves multiple functions: it acts as a shared resource for multiple GPU streams, provides both allocation and reuse capabilities, and supports various data structures (buffers, tensors, activations). This multi-functionality allows the system to handle large-scale computing tasks using a moderate total memory capacity, reducing the need for expensive high-capacity memory.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If graphics memory is allocated to each GPU stream independently, then stream isolation and reliability are maintained, but memory utilization efficiency deteriorates due to fragmentation and waste

Engineering Contradiction:
Improvestream isolationVSAvoidmemory utilization efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the graphics memory into multiple small blocks that can be independently allocated and reused. Each stream maintains logical isolation through its own allocation view, while physically sharing the segmented memory pool. This segmentation enables high utilization efficiency by allowing fine-grained memory reuse without compromising stream reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a graphics memory management unit as an intermediary between GPU streams and the physical memory blocks. This mediator manages allocation, tracking, and reuse of memory blocks, maintaining stream isolation through virtualization while enabling efficient reuse by coordinating allocations across streams. The intermediary resolves the conflict between isolation and efficiency.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If a graphics memory pool is introduced to enable reuse, then memory utilization efficiency improves, but the complexity of memory management increases

Engineering Contradiction:
Improvememory utilization efficiencyVSAvoidmemory management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The graphics memory management unit implements self-service mechanisms by automatically tracking memory block states, identifying reusable blocks, and allocating them without extensive external intervention. The system maintains its own allocation tables and state information, enabling efficient reuse while keeping management complexity contained within the dedicated management unit rather than propagating it throughout the entire system.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20250377937A1Graphics memory reuse methods and apparatuses based on GPU multistream concurrency
Publication Date: 2025.12.11 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US20250377937A1 patent drawing
  • US20250377937A1 patent drawing
  • US20250377937A1 patent drawing

AI summary

Embodiments of this specification provide graphics memory reuse methods and apparatuses based on GPU multistream concurrency. In an implementation of a default stream reuse mode, a method includes determining, based on (1) a released graphics memory corresponding to a current GPU stream that comprises a GPU instruction to which a graphics memory is to be allocated and (2) whether the current GPU stream is a default stream, whether a candidate reusable graphics memory block exists in a graphics memory pool for storing a released graphics memory block. If the candidate reusable graphics memory block exists, determining, from the candidate reusable graphics memory block, a graphics memory block to be allocated to the GPU instruction.