Neural Network Layer Grouping for Hardware-Aware Latency Prediction
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Measurement precision
If runtime optimization is not accounted for, then prediction is simpler, but latency predictions are incorrect due to missing fusion opportunities
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.
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.
3Measurement precision
If layer grouping is performed to account for runtime optimization, then latency prediction improves, but the prediction process becomes more complex
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.
Data Source
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.


