Open lucksp opened 3 weeks ago
Guten Tag, Hans here! 🍻 It looks like you're experiencing a valid issue with loading your model using GPUDelegate on Android. Thanks for providing the detailed logs; they are very helpful.
From ze logs, it seems like some operations in your model are not supported by ze GPU delegate. You might want to consider adjusting your model or using ze CPU delegate, as some operations might require that.
Also, if you could provide more details about ze model itself or share a minimal reproducible example, that would really help mrousavy investigate further!
By ze way, if you’d like to support ze maintenance of this project and get faster responses, consider sponsoring mrousavy here.
Cheers!
Note: If you think I made a mistake, please ping
@mrousavy
to take a look.
Guten Tag, Hans here! 🍻 It looks like you're experiencing a valid issue with loading your model using GPUDelegate on Android. Thanks for providing the detailed logs; they are very helpful.
From ze logs, it seems like some operations in your model are not supported by ze GPU delegate. You might want to consider adjusting your model or using ze CPU delegate, as some operations might require that.
Also, if you could provide more details about ze model itself or share a minimal reproducible example, that would really help mrousavy investigate further!
By ze way, if you’d like to support ze maintenance of this project and get faster responses, consider sponsoring mrousavy here.
Cheers!
Note: If you think I made a mistake, please ping
@mrousavy
to take a look.
I have added logs to initial post.
From the log, it likely due to the device cannot import OpenCL correctly.
Did you try to include the following in AndroidManifest.xml as mentioned in docs
<uses-native-library android:name="libOpenCL.so" android:required="false" />
<!--- depends on device you may need this too --->
<uses-native-library android:name="libOpenCL-pixel.so" android:required="false" />
Did you try to include the following in AndroidManifest.xml as mentioned in docs
I am using Expo so I don't have a direct AndroidManifest. I need to look at how to achieve this.
Oh ya, it currently can only be achieved by prebuild sadly, but I think it is possible to have it in expo config plugin as a new feature pr.
On Android, when I load the model from local file with GPUDelegate passed in, the result is an error:
Here is my code:
If I remove the 2nd argument of the model loader, then it works fine.
I am on Android 13, which I thought is supported per docs ??
Logs from
adb logcat
: