Neural Network Computational Graph Layer Fusion Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing neural network computational platforms face inefficiencies due to high data exchange frequency between off-chip memory and on-chip buffers, limited hardware resource utilization, and inflexible network topologies, which hinder real-time performance and adaptability.

Innovation Solution

A computational graph-level optimization method that reduces data exchange through layer decomposition and operation fusion, utilizing rules-based subgraph matching and automatic optimization to reconstruct the graph, thereby improving execution efficiency and adaptability to various network topologies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If data is frequently exchanged between off-chip memory and on-chip buffers during neural network computation, then computation can proceed with available data, but data exchange frequency increases causing performance degradation

Engineering Contradiction:
Improvecomputation throughputVSAvoiddata exchange time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent merges multiple adjacent layer operations into a single fused operation, allowing data to be processed continuously without being written back to and reloaded from off-chip memory. This combines multiple computation steps that previously required separate data exchanges into one continuous operation executed entirely on-chip.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent performs preliminary actions by pre-loading all necessary data for fused operations into on-chip buffers before execution begins, and by pre-organizing computational graphs to identify fusion opportunities. This prepares data and computation paths in advance to minimize runtime data exchange with off-chip memory.

Inventive Principle:
Principle #10Preliminary action

2Ease of manufacture

If computational operations are kept separate for ease of implementation, then programming is simpler, but hardware resource utilization decreases

Engineering Contradiction:
Improveimplementation simplicityVSAvoidhardware resource utilization
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent creates universal fusion rules that can be applied to various types of neural network layers (convolutional, fully-connected, normalization layers, etc.). These rules provide a multi-functional framework that adapts to different layer types and computational patterns, enabling efficient hardware resource utilization across diverse neural network architectures while maintaining systematic implementation.

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

3Loss of time

If computational graphs are optimized through layer fusion, then data exchange frequency reduces, but computation complexity within fused layers increases

Engineering Contradiction:
Improvedata exchange timeVSAvoidcomputation complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent segments the computational graph into identifiable layer units with clear interfaces, then applies fusion rules that systematically combine specific layer types. This segmentation approach breaks down the complex optimization problem into manageable segments (different layer types, different fusion patterns) that can be processed independently and systematically.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes computational parameters by fusing layers with different operation types into unified computational units. This transforms multiple separate operations with different parameters into a single operation with consolidated parameters, reducing the number of parameter sets that need to be managed while executing the fused computation.

Inventive Principle:
Principle #35Parameter changes

4Ease of manufacture

If fixed computational graph structures are used, then implementation is straightforward, but adaptability to different network topologies is limited

Engineering Contradiction:
Improveimplementation straightforwardnessVSAvoidnetwork topology adaptability
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic adaptation by providing a set of fusion rules that can be selectively applied based on the specific computational graph structure and layer types present. The optimization process dynamically identifies applicable fusion opportunities and applies appropriate rules, allowing the same framework to adapt to various network topologies including convolutional networks, recurrent networks, and hybrid architectures.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11514324B2Methods of optimization of computational graphs of neural networks
Publication Date: 2022.11.29 XILINX INC
  • US11514324B2 patent drawing
  • US11514324B2 patent drawing
  • US11514324B2 patent drawing

AI summary

The present invention discloses a method to optimize a neural network computational graph. The computational graph is used for performing neural network calculation by a computational platform. The computational platform reads data needed by the calculation from off-chip memory. The method comprises: layers which can be fused are selected at least based on an optimization rule to reduce frequency of data exchange between the computational platform and the off-chip memory, carrying out fusion for at least two adjacent layers in the computational graph according to the selected layer objects. Here, the at least two adjacent layers are at least one of the following: horizontally adjacent layers having the same input of feature maps; and longitudinally adjacent layers in which the calculation results of a feature map of a previous layer are at least part of input for a next layer. The method to optimize a computational graph of the present invention can be automatically carried out based on rules or through isomorphic subgraph matching. Thus, an optimal reconstruction mode for executing the computational graph is found out, execution efficiency of the neural network computational platform is improved.