Automated Code Generation for Deep Learning Inference
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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
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.
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
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.
Data Source
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.


