Automated Code Generation for Deep Learning Inference

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The training process of deep learning models is time-consuming and resource-intensive, and the manual updating of inference program code limits the flexibility and convenience of using these models, especially when new features or categories are introduced.

Innovation Solution

A method and device for generating program code by acquiring code configuration information, including target function and device information, to automate the generation of program code that can implement specific functions on target devices, using a code generation system that connects via a network and employs cross-development-framework compilers to generate executable code segments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If manual updating of inference program code is performed, then the code can be updated to accommodate new features and categories, but the process brings great inconvenience and reduces efficiency

Engineering Contradiction:
Improveadaptability of deep learning model to new featuresVSAvoidconvenience of updating inference program code
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The system performs preliminary actions by automatically generating updated inference program code when a deep learning model is updated, eliminating the need for manual code updates. The code generation device proactively creates the necessary program code based on the updated model, so users don't need to manually intervene when new features or categories are added to the model.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If inference program code is written according to specific functions or applications, then the code can implement specific tasks, but the flexibility of using the deep learning model is limited

Engineering Contradiction:
Improvefunctionality of program codeVSAvoidflexibility of using deep learning model
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The code generation device generates universal inference program code that can work with multiple different deep learning models and various applications. Instead of creating specialized code for each specific function, the system produces adaptable program code that maintains reliability across different models and use cases, thereby increasing the flexibility of deep learning model usage.

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

3Measurement precision

If deep learning model training is performed on devices with strong computing capability, then accurate inferences can be achieved, but the training process is time-consuming and resource-consuming

Engineering Contradiction:
Improveaccuracy of deep learning model inferenceVSAvoidtraining time of deep learning model
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system segments the deep learning workflow into distinct phases: model training on powerful servers (performed once) and model inference on various target devices (performed repeatedly). By separating training from inference and automatically generating optimized inference code, the system enables accurate inferences on resource-constrained devices without requiring them to perform time-consuming training processes.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11106434B1Method, device, and computer program product for generating program code
Publication Date: 2021.08.31 EMC IP HLDG CO LLC
  • US11106434B1 patent drawing
  • US11106434B1 patent drawing
  • US11106434B1 patent drawing

AI summary

Embodiments of the present disclosure relate to a method, a device, and a computer program product for generating program code. In one embodiment, a method for generating program code is disclosed, including: acquiring code configuration information that includes code function information indicating a target function and device configuration information of a target device; and generating program code based on the code configuration information, wherein when executed, the program code can cause the target device to implement the target function. Through the embodiments of the present disclosure, the diversity and flexibility of function implementation can be improved, and the workload of developing program code can be significantly reduced.