tum-ei-eda / mlonmcu

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

Improve log_instrs feature #110

Open PhilippvK opened 1 year ago

PhilippvK commented 1 year ago

Creating instruction traces for (multiple) large models with MLonMCU has a few problems:

  1. Very slow due to I/O bound (using sysout for capturing log)
  2. Needs post processing to split instruction trace from rest of log
  3. Complete trace is accumulated in RAM. if one trace would be 4GB big and you trace 32 models in parallel, at least 128GB of memory would be required
  4. Large Artifacts should be only referenced by paths to reduce memory usage
  5. Tracing directly to a file is currently not possible due to infrastructure limitations. A feature callback does not have access to the temporary directory of a run.

Proposals on how to deal with this will be added later.

PhilippvK commented 1 year ago

For 5.:

Possible we can provide a temporary directory for each component (similarly to the platform components) which is exposed to targets.