Hi team,
I'm running evkmimxrt1170_tensorflow_lite_micro_label_image_cm7 on the RT1170 EVK kit.
The inference time calculated using the systick timer in the example is incorrect when matched with the system time.
The inference time printed is as below.
which shows approximately 530ms for inferencing, which is not correct.
To check that if we put prints before and after run inference function as shown below:
which results in the below output:
If we check the time difference, it is 270ms.
I have also tried using pit timer which is provided as an example. It doesn't work properly when other process is running.
Can you please look into this issue and provide a solution.
Thanks & Regards,
Ramson Jehu K
Hello Ramson,
I tried using the tool you suggested. Unlike you, I get a longer time difference between the prints (about 770 ms) than I get from subtracting startTime from endTime (around 530 ms). I'm not sure how reliable the the Docklight application is for measuring on-chip time this way. I assume the timestamps are logged at the time of receiving data in Docklight from the board, not at the time of sending the data from the board. Therefore they don't really represent how much time passed between them on the board itself.
Nevertheless, it is indeed interesting that the time difference is smaller for you. Have you tried keeping the original outputs together with the before/after prints? Like so:
Additionally, when using a release build, the difference is only about 2 ms when using this code to read both time measurements:
printf("Before" EOL);
auto startTime = TIMER_GetTimeInUS();
MODEL_RunInference();
auto endTime = TIMER_GetTimeInUS();
printf("After" EOL);
Can you try a release build as well?
Best Regards,
David
Hello Ramson,
can you let me know what kind ouf serial output terminal you are using? I usually use PuTTY, which doesn't show timestamps and I'm not sure what terminal actually supports this feature.
Thanks,
David