Closed aitikgupta closed 3 years ago
Hi @aitikgupta thank you! I'll take a look. I have code using OpenGL and I pass it as input SSBO object (so I avoid cpu/gpu hops), I wonder if the api for the new gpu is the same
The new API is (almost) same.
"V2" is appended for some public functions like: TfLiteGpuDelegateV2Create
, TfLiteGpuDelegateOptionsV2
, etc.
Documentation is updated on their website: https://www.tensorflow.org/lite/performance/gpu_advanced#android_cc
Quoting their announcement blog:
In fact, the OpenCL backend has been in the TensorFlow repository since mid 2019 and seamlessly integrated through the TFLite GPU delegate v2, so you might be already using it through the delegate's fallback mechanism.
@aitikgupta Released v2.4.1 with the gpu_delegate, thank you for bringing that up....
The series of steps you followed generates (for android), 3 dynamic libs:
However, since I believe 2.2 (I believe) release, TFLite supports 2 backends for android, OpenGL (the one you generate) and one OpenCL. OpenCL is the default, and if some device doesn't support it, it automatically falls back to OpenGL backend.
The change in the build process should be:
instead of