GPU acceleration issue with tflitecamerademo app built from the latest source code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPU acceleration issue with tflitecamerademo app built from the latest source code

1,456 Views
sandeepgandiga
Contributor I

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!

0 Kudos
Reply
3 Replies

1,357 Views
jessiehao
NXP Employee
NXP Employee

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

0 Kudos
Reply

1,371 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,371 Views
sandeepgandiga
Contributor I

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!

0 Kudos
Reply