tensorflow: Class GpuDelegateFactory missing in Tensorflow Lite Java
It looks like the GpuDelegateFactory
is missing in the latest version of tflite on Android.
When ipmorting with org.tensorflow.lite.gpu.GpuDelegateFactory
, compilation fails with Unresolved reference: GpuDelegateFactory
.
I have imported the following packages:
implementation 'org.tensorflow:tensorflow-lite:2.10.0'
implementation 'org.tensorflow:tensorflow-lite-api:2.10.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.10.0'
implementation 'org.tensorflow:tensorflow-lite-gpu-delegate-plugin:0.4.2'
implementation 'org.tensorflow:tensorflow-lite-support:0.4.2'
But none of these seem to contain GpuDelegateFactory
.
Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
2.10.0
Custom Code
No
OS Platform and Distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
It looks like the `GpuDelegateFactory` is missing in the latest version of tflite on Android.
When ipmorting with `org.tensorflow.lite.gpu.GpuDelegateFactory`, compilation fails with `Unresolved reference: GpuDelegateFactory`.
I have imported the following packages:
implementation 'org.tensorflow:tensorflow-lite:2.10.0'
implementation 'org.tensorflow:tensorflow-lite-api:2.10.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.10.0'
implementation 'org.tensorflow:tensorflow-lite-gpu-delegate-plugin:0.4.2'
implementation 'org.tensorflow:tensorflow-lite-support:0.4.2'
But none of these seem to contain GpuDelegateFactory
.
### Standalone code to reproduce the issue
```shell
import org.tensorflow.lite.gpu.GpuDelegateFactory
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 16 (4 by maintainers)
Add this line to your build.gradle:
implementation 'org.tensorflow:tensorflow-lite-gpu-api:2.10.0'
Developers of library forgot to include a transitive dependency to tensorflow-lite-gpu-api from tensorflow-lite-gpu
@sachinprasadhs I’m guess, that the right solution is in adding transitive dependency from tensorflow-lite-gpu to tensorflow-lite-gpu-api. This is very unobvious, that the consumer of TensorFlow SDK must add an additional dependency manually. Fix will be available in the future version of TF SDK?
@mohantym importing DelegateFactory does not help. It really does seem like the class is just missing from the AAR, as @Erdemtsynduev points out.
Hi @mohantym . Looks like an issue in 2.10. I’m getting runtime exception with GpuDelegateFactory. Looks like it missing