sipeed / TinyMaix

TinyMaix is a tiny inference library for microcontrollers (TinyML).
Apache License 2.0
879 stars 142 forks source link

Add ESP32 port #7

Closed happyme531 closed 1 year ago

happyme531 commented 1 year ago

Simple port for ESP32
https://github.com/happyme531/TinyMaix-espidf_test
For sipeed2022_autumn_competition/sw_beginner

Zepan commented 1 year ago

thank you for you test! I notice the speed is significantly slower than same freq's other chip, maybe it is caused by flash speed. Can you try put model content in ram (remove "const") and run again? esp32's ram is enough to put mnist,cifar,vww model.

happyme531 commented 1 year ago

thank you for you test! I notice the speed is significantly slower than same freq's other chip, maybe it is caused by flash speed. Can you try put model content in ram (remove "const") and run again? esp32's ram is enough to put mnist,cifar,vww model.

config mnist cifar vww96 mbnet128 Note
O0 CPU 2.29 167.8 480.48 865.04 Model in Flash
O1 CPU 1.92 132.1 476.45 754.54 Model in Flash
O0 CPU 2.15 126.4 ------ ------ Model in RAM
O1 CPU 1.79 91.38 ------ ------ Model in RAM

Note: ESP32's RAM is segmented. The largest segment is only ~110KB so it can't hold the vww96 model.