Neural Network Code Generation Optimizing Memory and Execution Time

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing solutions for optimizing neural network executable codes fail to achieve a good compromise between memory allocation and execution time, as optimizing one often results in increased requirements for the other, leading to suboptimal performance.

Innovation Solution

A method to generate optimized executable code for neural networks by determining optimal memory allocation and execution time thresholds, evaluating implementation solutions for each layer, and developing code that balances performance criteria, allowing users to define desired memory allocation and execution time constraints.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If optimization is performed to reduce execution time, then execution time is improved, but memory allocation required for execution increases

Engineering Contradiction:
Improveexecution timeVSAvoidmemory allocation
Core Design Contradiction:
Loss of timeVSQuantity of substance

Solution Approach 1:

The patent applies dynamics by making the optimization process adaptive and iterative. The system dynamically adjusts optimization parameters based on user-defined constraints and automatically re-runs optimization with modified parameters until constraints are satisfied, rather than using a static single-pass optimization approach.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent segments the optimization process into distinct phases: initial optimization, constraint evaluation, and iterative re-optimization. This allows the system to address different aspects of the contradiction at different stages, first achieving baseline optimization then systematically adjusting for constraint compliance.

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If optimization is performed to reduce memory allocation, then memory allocation is improved, but execution time increases

Engineering Contradiction:
Improvememory allocationVSAvoidexecution time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The system dynamically responds to constraint violations by automatically adjusting optimization parameters and re-running the optimization process. This dynamic adaptation allows the system to shift optimization focus from execution time to memory allocation when constraints indicate memory is excessive, and vice versa.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements feedback mechanisms where the system evaluates whether optimized code satisfies user-defined constraints, and uses this evaluation to guide subsequent optimization iterations. The feedback loop ensures that optimization decisions are continuously adjusted based on actual performance against constraints.

Inventive Principle:
Principle #23Feedback

3Quantity of substance

If known solutions optimize memory allocation, then memory allocation is reduced, but a good compromise with execution time is not achieved

Engineering Contradiction:
Improvememory allocationVSAvoidcompromise between memory allocation and execution time
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent creates a universal optimization framework that can handle multiple types of constraints (execution time, memory allocation, and potentially other constraints) within a single system. The framework is versatile enough to adapt to different user needs and constraint combinations without requiring separate optimization approaches.

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

Solution Approach 2:

The system changes optimization parameters dynamically based on user-defined constraints. By adjusting parameters such as optimization level, code generation strategies, and resource allocation priorities, the system can achieve different balances between memory allocation and execution time to satisfy various constraint scenarios.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP4354350A1Method for generating a computer executable code for implementing a neural network
Publication Date: 2024.04.17 STMICROELECTRONICS (ROUSSET) SAS
  • EP4354350A1 patent drawingFigure 1~2
  • EP4354350A1 patent drawing
  • EP4354350A1 patent drawing

AI summary

According to one aspect, a method is proposed for generating executable code by a computer to implement an artificial neural network (INN) comprising an elaboration (25) of the executable code (ONN) by choosing for each layer of the neural network (INN) an implementation solution from among the possible implementation solutions of that layer based on the performance loss in terms of execution time and/or allocation of that implementation solution compared to the maximum execution time threshold and/or the maximum memory allocation threshold.