terryky / tflite_gles_app

GPU accelerated deep learning inference applications for RaspberryPi / JetsonNano / Linux PC using TensorflowLite GPUDelegate / TensorRT
MIT License
488 stars 130 forks source link

General system/linux setup #17

Closed FrankSpalteholz closed 3 years ago

FrankSpalteholz commented 3 years ago

Dear Yoshiteru,

first of all thank you VERY much for this great great repo! I go to get it work once :D ... that was last year on Linux Mint 19 and i guess by using Cuda10.1 and Cudnn 8 ... anyways ... since that i had to re-install Linux (this time i was trying Linux Mint Version 19, then 20 and also Ubuntu 18 and 20) on my machine i don't get the tensorflow-installation/compilation done without errors:

"Target //tensorflow/lite/delegates/gpu:libtensorflowlite_gpu_delegate.so failed to build"

It's definitely up to me and that i'm missing something but may i ask you which Linux distribution you are using (+ some extra-packages besides the video-codec) and also could you tell me if the "right" cuda, cudnn, clang or gcc (which version?) is somehow relevant to a successful compilation of tensorflow? (one last thing: could you please upload the 2 objectron sneakers models? there is just one in the model folder but that isn't a correct model) Thank you very much and take care! Frank

terryky commented 3 years ago

Hi Frank

FrankSpalteholz commented 3 years ago

Lighting speed answer ... Thank you very much! But still no success with compiling TFLite (even by testing/using 2.3) but to know that cuda and cudnn isn't really needed helps me speeding up trying different approaches. I'll post my solution in case of success.

terryky commented 3 years ago

Could you give me the details of the error ?

laolihaile commented 3 years ago

Could you give me the details of the error ?

  • Which build script did you use ? build_libtflite_r2.4.sh ?
  • Did you succeed in building libtensorflowlite.so ?
  • Are there any error logs or messages during the build of libtensorflowlite_gpu_delegate.so ?

I hava the same problem.

ERROR: /home/ur/work/tensorflow_r2.4/tensorflow/lite/delegates/gpu/gl/BUILD:156:1: C++ compilation of rule '//tensorflow/lite/delegates/gpu/gl:egl_environment' failed (Exit 1) In file included from ./tensorflow/lite/delegates/gpu/gl/egl_environment.h:25, from tensorflow/lite/delegates/gpu/gl/egl_environment.cc:16: ./tensorflow/lite/delegates/gpu/gl/portable_gl31.h:22:10: fatal error: GLES2/gl2.h: No such file or directory

include <GLES2/gl2.h>

      ^~~~~~~~~~~~~

compilation terminated. Target //tensorflow/lite/delegates/gpu:libtensorflowlite_gpu_delegate.so failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 0.399s, Critical Path: 0.09s INFO: 2 processes: 2 local. FAILED: Build did NOT complete successfully FAILED: Build did NOT complete successfully

build success.

ls: cannot access 'tensorflow/lite/tools/make/gen/linux_aarch64/lib/': There is no file or directory

terryky commented 3 years ago

To install GLES2/gl2.h, type the following

sudo apt install libgles2-mesa-dev
laolihaile commented 3 years ago

To install GLES2/gl2.h, type the following

sudo apt install libgles2-mesa-dev

thank you