GPU Request Batching for ML Model Inference Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional computing systems face inefficiencies in processing large numbers of floating point values, particularly when handling real-time data with GPUs, leading to increased resource utilization and latency issues.

Innovation Solution

Implementing a batching mechanism for requests processed by GPUs, where requests are stored in a queue and sent as a single message to pre-allocated memory, allowing for efficient processing using a trained machine learning model and minimizing memory operations by loading the model once for all requests.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional computing systems process large numbers of floating point values in real time, then processing capability is improved, but resource utilization increases and latency increases

Engineering Contradiction:
Improveprocessing capabilityVSAvoidresource utilization
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

Multiple individual processing requests are merged into a single batch request that is sent to the GPU as one message. This combining of requests allows the system to process multiple data points simultaneously, improving productivity while reducing the overhead resource utilization associated with handling numerous separate requests.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system pre-allocates GPU memory buffers and pre-processes batch requests before submission. By preparing data structures and memory allocations in advance, the system reduces runtime resource utilization and latency while maintaining high processing capability during actual execution.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If conventional computing systems process large numbers of floating point values in real time, then processing capability is improved, but latency increases

Engineering Contradiction:
Improveprocessing capabilityVSAvoidlatency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

Multiple individual processing requests are merged into a single batch request that is sent to the GPU as one message. This combining of requests allows the system to process multiple data points simultaneously, improving productivity while reducing the overhead resource utilization associated with handling numerous separate requests.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system maintains a continuous pipeline of batch processing operations, where requests are continuously queued, batched, and processed without interruption. This continuous operation eliminates idle time between processing cycles, maintaining high productivity while minimizing latency through efficient resource utilization.

Inventive Principle:
Principle #20Continuity of useful action

3Measurement precision

If machine learning models are loaded for each individual request, then processing accuracy is maintained, but memory operations increase

Engineering Contradiction:
Improveprocessing accuracyVSAvoidmemory operations
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

Multiple individual processing requests are merged into a single batch request that is sent to the GPU as one message. This combining of requests allows the system to process multiple data points simultaneously, improving productivity while reducing the overhead resource utilization associated with handling numerous separate requests.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system pre-loads the machine learning model into GPU memory once, before processing any requests. This preliminary action eliminates the need to repeatedly load the model for each request or batch, significantly reducing memory operations while maintaining processing accuracy throughout the batch processing lifecycle.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10846096B1Batch processing of requests for trained machine learning model
Publication Date: 2020.11.24 AMAZON TECH INC
  • US10846096B1 patent drawing
  • US10846096B1 patent drawing
  • US10846096B1 patent drawing

AI summary

Memory management is provided for processors, such as GPUs used to process data using a trained machine learning model. Requests received to a CPU can be stored to a request queue until the queue is full, or until a timeout value has been reached for periods of lower activity. The requests can then be batched and sent to a GPU as a single message on a single thread. Memory can be pre-allocated, and the trained model loaded into GPU memory once for processing of the relevant batches. The individual requests can be processed by the GPU and the results analyzed to determine at least a subset of results to return to the CPU, which can be provided back as results of the processing.