tum-ei-eda / mlonmcu

Tool for the deployment and analysis of TinyML applications on TFLM and MicroTVM backends
Apache License 2.0
29 stars 12 forks source link

Get fair comparisons by using memcpy for inputs and outputs on every backend #29

Open PhilippvK opened 2 years ago

PhilippvK commented 2 years ago

Currently some backends use their own input buffer which needs to be filled beforehand while others just take a pointer to the constant input data in ROM.

The former has the advantage that the input buffer itself can be considered memory planning. The latter uses ROM instead of RAM which may be desirable or not.

We have at least 1 model with a fairly large input size (~40kB). This leads to an to observation that e.g. tvmaot needs much more RAM than tflmi for this model.

We could instead decide to use the same approach for every supported backend, aka. copy the constant input data via memcpy to RAM first.