Neural Network Layer Grouping for Hardware-Aware Latency Prediction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for predicting neural network latency on hardware configurations are inefficient, fail to generalize across different models and hardware, and do not account for runtime optimization, leading to incorrect resource allocation and high costs.

Innovation Solution

A graph-based approach using two machine learning models to partition neural networks into layer groups and predict latency, employing graph neural networks (GNNs) to learn fusion rules and optimize resource allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing methods are used for predicting neural network latency, then resource allocation can be performed, but the predictions are incorrect and costs are high due to failure to generalize across different models and hardware

Engineering Contradiction:
Improvelatency prediction accuracyVSAvoidgeneralization across models and hardware
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system changes the parameters of latency prediction by introducing hardware-aware features (GPU architecture version, memory bandwidth, compute capability) and model-aware features (layer types, operator fusion opportunities, data types) into the prediction model. This allows the system to adapt predictions to specific hardware configurations and model characteristics, resolving the contradiction between prediction accuracy and generalization capability.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent segments the neural network into computational kernels and groups layers that can be fused together. It also segments the hardware characteristics into distinct categories (compute capability, memory architecture, bandwidth). This segmentation allows the system to make precise predictions for each segment while maintaining the ability to generalize across different models and hardware configurations through the modular prediction approach.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If runtime optimization is not accounted for, then prediction is simpler, but latency predictions are incorrect due to missing fusion opportunities

Engineering Contradiction:
Improvelatency prediction accuracyVSAvoidprediction system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary analysis of the neural network graph to identify potential operator fusion opportunities before execution. It pre-determines which layers can be fused based on data type compatibility, memory access patterns, and computational characteristics. This preliminary action allows the prediction system to account for runtime optimizations without adding complexity during actual execution, improving prediction accuracy while managing system complexity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary layer in the prediction system that analyzes the neural network structure and hardware characteristics to determine optimal fusion strategies. This intermediary component acts as a mediator between the neural network model and the hardware platform, translating abstract computational graphs into concrete execution plans with optimized latency predictions, thereby improving accuracy without proportionally increasing overall system complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If layer grouping is performed to account for runtime optimization, then latency prediction improves, but the prediction process becomes more complex

Engineering Contradiction:
Improvelatency prediction accuracyVSAvoidpartitioning and prediction process complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges multiple layers into computational kernels based on fusion opportunities identified through analysis of data types, memory access patterns, and computational characteristics. By combining adjacent layers that can be executed together, the system reduces the number of separate prediction calculations needed. This merging approach improves prediction accuracy by accounting for runtime optimizations while actually simplifying the overall prediction process through fewer, more comprehensive kernel-level predictions.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS20250356199A1Resource-aware model-driven latency prediction for model serving
Publication Date: 2025.11.20 ADOBE INC
  • US20250356199A1 patent drawing
  • US20250356199A1 patent drawing
  • US20250356199A1 patent drawing

AI summary

Some aspects relate to technologies for using machine learning models to predict latency for executing neural networks on various hardware configurations. In accordance with some aspects, a neural network representation for a target neural network having a plurality of layers is received. A first machine learning model groups layers of the target neural network to provide a plurality of layer groups based on the neural network representation, with at least one layer group comprising multiple layers from the target neural network that can be executed by a single operation. A second machine learning model generates a latency prediction for executing the target neural network on a target hardware configuration based on the layer groups.