-
Notifications
You must be signed in to change notification settings - Fork 74k
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
What phone support tensorflow lite GPU delegate? #60825
Comments
Hi @ldfandian Can you please add the following to the Android manifest in order to detect GPU delegate.
Thanks. |
Thanks for the quick response. I tried to add the following code in AndroidManifest.xml, but it does not work.
Btw, on the Xiaomi 12s Ultra, I checked that the file "/system/vendor/lib64/libOpenCL.so" does exist. The content of "/system/etc/public.libraries.txt" and "/etc/public.libraries.txt" is like:
The content of "/vendor/etc/public.libraries.txt" and "/system/vendor/etc/public.libraries.txt" is like:
Here is the logcat info:
|
An update, after adding those uses-library/uses-native-library settings in AndroidManifest.xml, OnePlus 8T works but the other three devices still don't work... I compared the their content of /system/etc/public.libraries.txt, but find nothing different among these devices. What's the magic here? |
Hi @ldfandian, Have you tried using our acceleration service to see which configuration might be optimal for each of your phones? https://www.tensorflow.org/lite/android/acceleration_service Have you checked the documentation here: https://www.tensorflow.org/lite/android/delegates/gpu_native ? Also for more information, are you using an emulator or the actual phones? |
Thanks for the advice. Good to know it, but my phone does not have a Google play service installed~ |
No worries, @ldfandian did the documentation help at all? Additionally please let us know if you are using emulators or actual phones or some combination of them. Thanks. |
All of these (Xiaomi 12s Ultra, OnePlus 8, Honor Nova 10, Oppo Reno 9) are real phones sold in China. |
Hi @sirakiin, can you please take a look? |
Triage to @grantjensen . Could you help on this? Thanks! |
Hi @ldfandian, looking at the GPU's used in these devices (Adreno 730, Adreno 642L) we have full support. I was able to confirm this via the following commands:
This way we can confirm whether your issue is confined to TFL code or something broader. Please run the above code & let me know how it goes, thanks. |
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. |
Actually, I have similar issue too. I cannot do GPU prediction on Phone. Tensorflow : 2.9 I am getting this flag as False |
Click to expand!
Issue Type
Support
Have you reproduced the bug with TF nightly?
No
Source
binary
Tensorflow Version
2.12.0
Custom Code
No
OS Platform and Distribution
Android 13
Mobile device
Android 13
Python version
3.8.3
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
I tested multiple mobile phones (including Xiaomi 12s Ultra, OnePlus 8, Honor Nova 10, Oppo Reno 9) using the example Android apk at https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android . On all of the devices, the app tells "GPU is not supported", but NNAPI and CPU is OK.
Anything I can do to enable the GPU delegate on these Qualcomm Snapdragon devices?
Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: