Neural Network Instruction Sequencing via Graph Partitioning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing neural network model compilation methods struggle to generate optimal instruction sequences due to the lack of hardware-specific optimizations, leading to suboptimal performance and increased search costs.

Innovation Solution

The method involves partitioning a computation graph into sub-graphs, generating instruction sub-sequences based on resource status information, and determining a target instruction sequence using reinforcement learning to optimize resource allocation and reduce search costs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the computation graph is processed as a whole without partitioning, then the instruction sequence generation maintains simplicity, but the performance optimization and resource allocation efficiency deteriorate

Engineering Contradiction:
Improveinstruction sequence generation efficiencyVSAvoidcomputation graph processing complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The computation graph is partitioned into multiple computation sub-graphs based on hardware resource constraints and data dependencies. Each sub-graph can be independently optimized and mapped to specific hardware resources, enabling parallel processing and improving overall instruction sequence generation efficiency while maintaining manageable complexity through modular processing

Inventive Principle:
Principle #1Segmentation

2Reliability

If hardware-specific optimizations are applied to generate optimal instruction sequences, then the execution performance improves, but the search cost and compilation time increase

Engineering Contradiction:
Improveinstruction sequence performanceVSAvoidcompilation search time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Resource status information is obtained in advance before instruction sequence generation. The system pre-analyzes hardware resource availability, capabilities, and constraints, storing this information for use during the compilation process. This preliminary action enables faster optimization decisions during instruction sequence generation without requiring extensive search during compilation

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Different computation sub-graphs are optimized based on local hardware resource status and specific computational requirements. Each sub-graph receives tailored optimization strategies according to the available hardware resources and data dependencies, rather than applying uniform optimization across the entire computation graph, thus improving performance while reducing overall search complexity

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP4650945A1Method and apparatus for generating instruction sequence, electronic device, and storage medium
Publication Date: 2025.11.19 BEIJING HORIZON INFORMATION TECH CO LTD
  • EP4650945A1 patent drawingFigure 1~2
  • EP4650945A1 patent drawingFigure 3~4
  • EP4650945A1 patent drawingFigure 5~6

AI summary

Disclosed are a method and apparatus for generating an instruction sequence, an electronic device, and a storage medium. The method for generating an instruction sequence includes: determining a computation graph corresponding to a neural network model to be compiled and resource status information on hardware executing the instruction sequence; partitioning the computation graph, to determine multiple computation sub-graphs; generating, based on the computation sub-graphs and the resource status information, instruction sub-sequences corresponding respectively to the computation sub-graphs; and determining, based on the instruction sub-sequences, a target instruction sequence corresponding to the neural network model to be compiled.