I tried to implement Java application internally usning native c++ SNPE with JNI.
snpe = snpeBuilder.setOutputLayers(outputNames)
.setRuntimeProcessorOrder(runtimeList)
.setUseUserSuppliedBuffers(useUserSuppliedBuffers)
.setPlatformConfig(platformConfig)
.setInitCacheMode(useCaching)
.build();
However, the above build function returns nullptr regardless of any runtimes (CPU, GPU).
The error code generated with zdl::DlSystem::getLastErrorString() is as follows.
error:error_code=1200; error_message=libstd error. error_code=1200; error_message=libstd error. QnnBackend_initialize failed: 1006; error_component=Dependent library; line_no=646; thread_id=485820816560; error_component=Dependent library; line_no=342; thread_id=501993092344
I checked my dlc file has no problem. I successfuly ran the dlc using command line execution with adb shell.
Also, If I used older SNPE (ver.=1.15.0) with older smartphone, the dlc successfully ran on my Java application.
So my compile script seems no problem at least for older SNPE.
I have to use SNPE>=1.62, because I want to use 8 Gen 1 Snapdragon.
I suspect the problem is around the newly added libc++_shared.so.
In command line execution, setting LD_LIBRARY_PATH to libc++_shared.so is needed, but I don't know collect way in app.
Any suggestion...?
Dear developer,
You can take a look at below instructions,
1 Add enable_htp to snpe-dlc-quantize flow
2 unsingedPD:OFF is required for SNPE 1.6x or later.
BR.
Wei
Thank you for reply.
1. The model is not quantized.
2. I set unsignedPD as follows.
But different errors came up...
*If CPU runtime:
*If GPU runtime:
What is wrong...?
[Additional information of the state]
My app can run with SNPE 1.65 if it is on Snapdragon 865 after setting unsignedPD:OFF.
However, It can't run on Snapdragon 888 and 8 Gen 1.