espressif / esp-nn

Optimised Neural Network functions for Espressif chipsets
Apache License 2.0
125 stars 22 forks source link

Can I use `esp-nn/src/convolution /esp_nn_conv_s8_mult8_1x1_esp32s3.S` in my own project? #9

Open junnan-xjtu opened 6 months ago

junnan-xjtu commented 6 months ago

I want to deploy some open source algorithms on esp32s3. The operators used in the current deployment are all designed by myself and are very simple. For example, convolution is nested through for loops, combined with some img2col processing, and the operating efficiency is very low.

I saw that there are some assembly source codes in this warehouse that use esp32s3 extended instructions for computing acceleration. Can I directly migrate these assembly operators to my project? If so, what adaptation work should I do? If not, can you tell me how to use the extended instructions of esp32s3? I don't have much experience in using assembly language.

Thank you so much!

vikramdattu commented 6 months ago

Hello @junnan-xjtu you may refer to my assembly and modify the same to cater your needs. You may take a look at following trm which will help you understand and write the assembly: https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_en.pdf

junnan-xjtu commented 6 months ago

Thank you for your prompt reply! I understand what you mean, and that's exactly what I plan to do. But I saw you mentioned that esp-nn supports tflite APIs only, which is shown in https://github.com/espressif/esp-nn/issues/4. In my project, the model weights are all exported into one-dimensional arrays instead of tflite-micro format. Will this have any impact?