-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Support espdl #1519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support espdl #1519
Conversation
f56540d to
51f2b7e
Compare
lutzroeder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sun-xiangyu, thank you for the pull request. Can you provide some context why a new format is needed and what purpose it serves instead of using an existing format?
esp-dl is written for tiny Espressif MCUs (ESP32-Sx, Cx) that have <1MB RAM and no MMU.To hit the latency/energy numbers we had to add:
None of the existing formats (ONNX, TFLite, Caffe, …) can describe all of these tricks at the same time, so we would have had to carry an out-of-tree “annotation” file anyway. Users continue to work in PyTorch/TF → export to ONNX → run our open-source tool esp-ppq that does INT8/16 PTQ/QAT and graph transforms, then serializes the result as .espdl. In short, it is the smallest possible delta that lets us describe the quantized, layout-tweaked graphs that our MCU inference engine needs. |
51f2b7e to
a6ec854
Compare
a6ec854 to
2f71d59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the existing formats (ONNX, TFLite, Caffe, …) can describe all of these tricks at the same time, so we would have had to carry an out-of-tree “annotation” file anyway.
Could this be accomplished by using one of the extensible metadata mechanisms formats offer. ONNX for example has metadata_props for most objects. Operators could still use their own conventions. This would avoid inventing yet another graph container format.
edfb300 to
cad5aa5
Compare
We initially wanted to reuse the ONNX format, but we ran into some issues:
|
2b553ad to
1bafcb2
Compare
0ee38f8 to
04d600c
Compare
ESP-DL is a deep learning library developed by Espressif Systems for deploying neural networks on resource-constrained microcontrollers. The model extension is
.espdl.Since Netron is an excellent tool for visualizing neural network models, we hope to contribute by integrating ESP-DL model support into it.
For this pull request, we have implemented all necessary visualization functions, for example:
@lutzroeder , please help review and meger it.