Tensor Prefetching for Deep Learning Memory Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing unified memory systems for deep learning applications struggle to identify and manage memory usage patterns, leading to inefficiencies in memory allocation and prefetching.

Innovation Solution

A processor-implemented method that allocates tensors to memory for initial training iterations, generates unique information for tensors, stores pattern information for tensor and kernel allocation, and prefetches tensors based on this information to optimize subsequent training iterations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If tensors are allocated to memory for each kernel execution in deep learning training, then the deep learning application can be executed, but memory access latency increases and training performance deteriorates

Engineering Contradiction:
Improvetraining speedVSAvoidmemory access latency
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs preliminary actions by predicting which tensors will be needed for future kernel executions and prefetching them into memory before they are actually required. This advance preparation eliminates waiting time during tensor access, directly reducing memory access latency and improving training speed.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If unified memory is implemented to integrate CPU and GPU memory, then programming becomes easier with single virtual address space, but memory usage patterns become difficult to identify and manage

Engineering Contradiction:
Improveprogramming easeVSAvoidmemory management complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The system implements feedback mechanisms by monitoring and analyzing actual memory access patterns during kernel executions. This feedback information is used to refine predictions about future tensor access patterns, enabling the system to adaptively optimize prefetching strategies and manage unified memory more effectively.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system employs self-service by automatically analyzing its own memory usage patterns and generating optimization strategies without requiring external intervention. The memory management system observes its own operations, identifies patterns, and autonomously adjusts prefetching and allocation strategies to improve performance.

Inventive Principle:
Principle #25Self-service

3Productivity

If tensors are managed without pattern recognition, then memory allocation is simple, but memory resource utilization is inefficient

Engineering Contradiction:
Improveresource utilization efficiencyVSAvoidtensor management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system replaces mechanical, rule-based tensor management with an intelligent system that uses machine learning models to predict tensor access patterns. This substitution enables the system to automatically adapt to varying workloads and optimize memory resource utilization based on learned patterns rather than fixed allocation rules.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS20250199857A1Electronic device and method with tensor management and prefetching
Publication Date: 2025.06.19 SAMSUNG ELECTRONICS CO LTD
  • US20250199857A1 patent drawing
  • US20250199857A1 patent drawing
  • US20250199857A1 patent drawing

AI summary

A processor-implemented method includes allocating tensors to a memory to perform an initial iteration of training of a deep learning application, wherein the initial iteration is performed through execution of a plurality of kernels and, in response to each kernel being executed, tensors corresponding to the each kernel are used to execute the kernels, storing pattern information for allocating the tensors and the kernels to the memory in the initial iteration, and prefetching the tensors based on the pattern information to perform a next iteration of training of the deep learning application.