Questions on the error logging

Hi, I have a question about error logging/report of Ethos-U series with FVP environment.
I found the error logging works fine on the source files. Below is a code snippet of [ml-embedded-evaluation-kit/source/application/tensorflow-lite-micro/Model.cc]
image
Both logging functions [info() and printf_err()] print strings well to stdout.

Whereas, inside the function AllocateTensors()[ml-embedded-evaluation-kit/dependencies/tensorflow/tensorflow/lite/micro/micro_interpreter.cc], error loggers doesn’t work at all.
I’d like to check the reason of the allocation failure with TF_LITE_REPORT_ERROR function but it seems that the error report functions are disabled. Additionally, other logging functions such as MicroPrintf() seem also disabled.

For now, according to ml-embedded-evaluation-kit/dependencies/tensorflow/tensorflow/lite/micro/micro_error_reporter.cc, I found that the functionality of those logging functions depends on the flag [TF_LITE_STRIP_ERROR_STRINGS]

So I thought that the problem is related to the build configurations so I used three flags during cmake process.
-DETHOSU_LOG_SEVERITY=debug
-DLOG_LEVEL=LOG_LEVEL_TRACE
-DCMAKE_BUILD_TYPE=Debug
And it turned out to be they are not really related to this problem. Even with those flags, the logging functions does not write error strings to stdout.

My question is: How come do those logging function not working? I guess they are strongly related to the flag [TF_LITE_STRIP_ERROR_STRINGS]. If so, how can I explicitly disable the flag? If not, are there any method to enable the error functions?

Thank you for your attention.

Hi there,

Thanks for bringing this issue to our attention, we will look into this and get back to you with an answer as soon as we can.

Please note there is a public holiday on Monday so if we don’t manage to answer you today then you may have to wait till early next week for a reply.

Thanks,
Richard

Hi,

Thanks for raising this. The issue wasn’t actually with any build flags, even the Release build should work fine as it will set the TensorFlow Lite Micro’s BUILD_TYPE to release_with_logs => the compilation flag TF_LITE_STRIP_ERROR_STRINGS is not set.

This CR 7486 fixes the issue. If you move up to the latest commit, you should hopefully see your issue resolved.

Thanks,
Kshitij

thanks for the awesome information.