When I use tflitecamerademo app that comes with the Android 10 NXP BSP on i.MX8QM MEK, the app seems to be working fine.
When I build tflitecamerademo app from the latest tensorflow source code (lite demo, no modifications) and install on the MEK the app only works for CPU and NNAPI cases and does not work when GPU device/acceleration is selected. (I made sure old app is completely removed).
Please the attached log (see around line 150 for GPU delgation), I also observed with other tesnsorflowlite apps like image classification.
Please suggest if I there is a fix or workaround.
Wondering how tflitecamerademo app that comes with the Android 10 NXP BSP is working, is there a NXP patch?
Thanks!
Hello Sandeep,
Android use NNAPI to acceleration,not GPU.
For GPU not work with latest tensorflow source code issue, we'll further check whether it's our GPU issue or APK issue.
Thanks
Hello Sandeep,
It should work without any patch with latest Android 10. From your error, it looks like you got deny when opening some files, may be related to some trust zone issue.
Could you check you system again?
If you still have the issue, I can ask android expert.
do you have this file in your system /data/vendor/.opencl-cache/viv_gc_img_builtin.lib?
Regards
There is no /data/vendor/.opencl-cache/viv_gc_img_builtin.lib file. I don't see viv_gc_img_builtin.lib anywhere in the target.
There is /data/vendor/.opencl-cache/ folder.
Any suggestions on the trust zone issue?
I am using android-10.0.0_2.3.0_image_8qmek userdebug image, developer mode enabled, bootloader unlocked, adb rooted, dm-verity disabled, adb remounted, added /vendor/etc/public.libraries.txt with libOpenCL.so entry in it (as per How to use OpenCL on iMX8 with Android ). libOpenCL available in /vendor/lib/libOpenCL.so and /vendor/lib64/libOpenCL.so
Again, I am seeing this issue with any tensorflowlite application I use (e.g. Image classification | TensorFlow Lite , OR tensorflowlite benchmark tensorflow/tensorflow/lite/tools/benchmark/android at master · tensorflow/tensorflow · GitHub ).
Greatly appreciate your help.
Thanks!