Dynamic Neural Network Kernel Fusion for Compute Graph Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current techniques for kernel fusion in deep learning models are either impractical due to the need for extensive manual effort or limited by the inflexibility of pre-fused libraries and tensor compilers, which do not adequately optimize neural network performance across a broad range of computation scenarios.

Innovation Solution

A dynamic system that identifies and combines kernels based on their characteristics using a generated rule set, automatically generating instructions to optimize neural network architecture and resource allocation, thereby simplifying the compute graph and reducing memory access bottlenecks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manual kernel fusion is performed for critical networks, then execution performance is improved, but development time and programming resource allocation increase

Engineering Contradiction:
Improveexecution performanceVSAvoiddevelopment time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs self-optimization by automatically analyzing the computation graph and applying kernel fusion transformations without requiring manual programming. The optimization engine autonomously identifies fusion opportunities and generates optimized code, allowing the system to improve its own execution performance without external intervention.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system dynamically changes optimization parameters based on the specific characteristics of each computation graph. It adjusts fusion strategies, memory allocation, and execution plans according to the actual data flow and computational patterns, rather than using fixed manual optimization rules.

Inventive Principle:
Principle #35Parameter changes

2Ease of manufacture

If pre-fused kernel libraries are used, then ease of implementation is improved, but adaptability to different computation scenarios deteriorates

Engineering Contradiction:
Improveease of implementationVSAvoidadaptability to computation scenarios
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The system transitions from static pre-fused kernels to dynamic kernel generation. It adapts the computation graph optimization in real-time based on the specific scenario, data characteristics, and hardware resources available, allowing the same system to handle diverse computation scenarios effectively.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The optimization engine serves multiple functions: it analyzes the computation graph, identifies fusion opportunities, generates optimized kernels, and adapts to different hardware platforms. This universal system replaces the need for separate pre-fused libraries for each scenario while maintaining ease of implementation.

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

3Productivity

If tensor compilers with limited flexibility are used, then broad range performance is improved, but optimization flexibility deteriorates

Engineering Contradiction:
Improvebroad range performanceVSAvoidoptimization flexibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system segments the optimization process into distinct analytical phases: computation graph analysis, fusion opportunity identification, kernel generation, and execution planning. This segmentation allows each phase to be optimized independently while maintaining overall flexibility across different scenarios.

Inventive Principle:
Principle #1Segmentation

4Ease of operation

If kernels are processed sequentially without fusion, then implementation simplicity is improved, but memory access efficiency deteriorates

Engineering Contradiction:
Improveimplementation simplicityVSAvoidmemory access efficiency
Core Design Contradiction:
Ease of operationVSLoss of energy

Solution Approach 1:

The system merges adjacent kernels in the computation graph into fused operations, combining multiple memory access patterns into a single optimized pass. This reduces the total number of memory fetches and stores while maintaining implementation simplicity through automatic code generation.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS20220335287A1Systems and methods for dynamically updating a neural network having a plurality of kernels
Publication Date: 2022.10.20 NVIDIA CORP
  • US20220335287A1 patent drawing
  • US20220335287A1 patent drawing
  • US20220335287A1 patent drawing

AI summary

In various examples, systems and methods are disclosed herein for dynamically updating a neural network having a plurality of kernels. The system may identify a first subset of kernels from the plurality of kernels in the neural network. The system may then determine the characteristics of each respective kernel in the first subset. The system may then compare the characteristics of the respective kernels in the first subject to a dynamic rule set. In response to the system comparing the characteristics of the respective kernels in the first subset to the dynamic rule set, the system identifies a second subset of the first subset based on the comparing, automatically generates instructions to combine the second subset of kernels, and updates the neural network based on the one or more instructions. The neural network may have a simplified compute graph based on the above dynamic updating systems and methods.