tensorflow / tensorflow/tflite-support
GPU Delegation error in Andoid (java.lang.IllegalArgumentException: Internal error: Error applying delegate:)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 441
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
i have completed a keral_nlp,english to spanish translation task check this below colab notebook https://colab.research.google.com/drive/1qTDpDp1N6gyejkzmuCfrTtGVX1EJsnve#scrollTo=ctUYMsASP46V
in this i have created a "BeamSampler" tflite model it was working fine ,but in android side for better performance(faster inference) acheiving ,while applying GPU delegate, getting this error "java.lang.IllegalArgumentException: Internal error: Error applying delegate:"
please help me how to overcome this issue
tflite model contains these ops:(10,
array(['CAST', 'CONCATENATION', 'EXPAND_DIMS', 'GATHER', 'RESHAPE',
'SHAPE', 'STRIDED_SLICE', 'TILE', 'TOPK_V2', 'WHILE'], dtype='<U13'))
i already gone through this documentation https://www.tensorflow.org/lite/performance/gpu
i am using this code to enabling the GPU Delegate(Android)
CompatibilityList compatList = new CompatibilityList();if(compatList.isDelegateSupportedOnThisDevice()){ // if the device has a supported GPU, add the GPU delegate GpuDelegateFactory.Options options1 = new GpuDelegateFactory.Options().setQuantizedModelsAllowed(true); GpuDelegate gpuDelegate = new GpuDelegate(options1); opt.addDelegate(gpuDelegate);} else { // if the GPU is not supported, run on 4 threads options.setNumThreads(4);}
i am using this TFVersion org.tensorflow/tensorflow-lite-api) » 2.13.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Android GPU delegate setup using CompatibilityList, GpuDelegateFactory, and GpuDelegate, then compare the model's listed ops with the TensorFlow Lite GPU delegate documentation and the linked Colab notebook. Done means determining which operation or model constraint causes delegate application to fail, or documenting that this model cannot use the GPU delegate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, tensorflow
- Domain
- machine-learning, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100