Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with operator performance profiling #331

Open
4570235 opened this issue Dec 19, 2024 · 0 comments
Open

Problems with operator performance profiling #331

4570235 opened this issue Dec 19, 2024 · 0 comments

Comments

@4570235
Copy link

4570235 commented Dec 19, 2024

I want to profile the operator performance of my custom tflite model in android phone 'Google Pixel 6'.
I have followed the tutorial Trace LiteRT internals and built a very simple test program [source code]. However, I encounter some problems.

Firstly, when I tested the model 'mobilenetv1.tflite' from tflite example image_classification, if my program depends on LiteRT

implementation 'com.google.ai.edge.litert:litert:1.0.1'
implementation 'com.google.ai.edge.litert:litert-support:1.0.1'

then the Android Studio CPU Profiler shows
image

I cannot see all the operators. So I switch to depend on TFLite

implementation 'org.tensorflow:tensorflow-lite:2.12.0'
implementation 'org.tensorflow:tensorflow-lite-support:0.4.0'

then it works. Here's the result:
image

And I also figure out that the maximum version of TFLite that works is tensorflow-lite:2.12.0 with tensorflow-lite-support:0.4.0. Trying any newer version would result the same as LiteRT's.
So, is this a bug? How can I trace operator performance with the newest version of TFLite or LiteRT?

Secondly, with tensorflow-lite:2.12.0 and tensorflow-lite-support:0.4.0 mentioned above, I tried to trace my custom model which is very similar to Qualcomm's 'quicksrnetsmall.tflite'. Let's take 'quicksrnetsmall.tflite' as an sample and the Profiler shows
image

I cannot see any operators. How can I fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant