Hi,
Whenever i call the NeuralNetworkBuilder, i would get an error [couldn't find "libsnpe-android.so"] as listed. This happened on both the Android Studio emulator and the Sony Xperia Qualcomm 845 phone (Android 8). Is there a prerequisite library i need to install on the phone?
builder = new SNPE.NeuralNetworkBuilder(this.getApplication())
.setRuntimeOrder(CPU)
.setModel(file);
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/base.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_resources_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/base.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_resources_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libsnpe-android.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at com.qualcomm.qti.snpe.SNPE.init(SNPE.java:46)
at com.qualcomm.qti.snpe.SNPE.access$000(SNPE.java:31)
at com.qualcomm.qti.snpe.SNPE$NeuralNetworkBuilder.<init>(SNPE.java:87)
at com.example.dh.frnpronphones.PoseActivity.initModel(PoseActivity.java:431)
at com.example.dh.frnpronphones.PoseActivity.onCreate(PoseActivity.java:92)
at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Thanks.
Hi,
After digging into the problem, i have come to a few more observations and assumptions.
Assumptions
1. The update to Android 8 (Oreo) has potentially introduced a new problem. https://source.android.com/devices/tech/config/namespaces_libraries
2. There needs to be a way to bundle OpenCL with SNPE apps?
3. SNPE apps cannot work starting from Android 8?
Observations
1. This problem happened after the phone self updated to Android 8 (Oreo), it came in Android 7 (Nougat). I remember running the SNPE-ImageClassifer successfully on the same phone.
2. SNPE-ImageClassifer also facing the same error now.
3. On closer inspection, the error stemmed from a mission libOpenCL.so library. However the library is physically located at /vendor/lib64 folder.
4. The libOpenCL.so library is not listed in /system/etc/public.libraries.txt, should it be?
5. Downgrading the app to target SDK 22 does not help.
6. Android binaries snpe-net-run still works.
Thanks.
Regards,
Jax
Pixel2 (android 8, qualcomm 835) SNPE: Only Support CPU, No-GPU, No-DSP
Asus (android 7, qualcomm 835) SNPE: CPU & GPU & DSP & GPU_Float16
other ( android 7.1.1, qualcomm 835) SNPE: CPU & GPU & DSP & GPU_Float16
Nexus5x (Android 8.1 qualcomm 808) SNPE: CPU Only
LG G6 (Android 7 Qualcomm 820) SNPE: CPU & GPU
snpe is not support android 8 ??
My LG V30+ updated to Android 8.0 from android 7.1 yesterday and now GPU is no longer supported for the SNPE libraries.
I have looked into this and came to many of the same conclusions that jax79sg had:
If anyone from Qualcomm can advise us on what to do it would be greatly appreciated. I am working on a company that was excited to use the mobile platform with Snapdragon processors to deploy Machine learning solutions and it would be a great loss if this is no longer viable.