Forums - Unable to obtain snpe object from a dlc model

3 posts / 0 new
Last post
Unable to obtain snpe object from a dlc model
yashwanth.raj
Join Date: 12 Jul 22
Posts: 2
Posted: Tue, 2022-12-06 21:45
Context
We use Qualcomm Neural Processing SDK in our android application for deploying neural network for image processing. I are currrently in the process of upgrading our libs from 1.61.0 to a higher version. The main intention of the upgrade is to use the updated v1.2.12 or higher version of zlib. This version of zlib is present in SDK v1.62 and higher. We are also using opencv v3.4.11 for image processing. 
 
Tools and lib used
NDK version -> NDK19rc
Clang version -> 8.0.2(embeded with NDK 19)
Qualcomm Neural Processing - 1.62.0 and higher
Opencv android SDK - 3.4.11
 
Other relvant details
STL used is c++shared
 
We obtain the snpe object need for executing the model using the method below.
 
setBuilderOptions(container, runtime, runtimeList,  useUserSuppliedBuffers, platformConfig, usingInitCaching);
 
runtime = zdl::DlSystem::Runtime_t::GPU
runTimeList = uninitializeed
platformConfig = uninitialized
container = obtained by loading the dlc model from bytebuffer using a custom loadContainerFromBuffer() method.
useUserSuppliedBuffers = true
usingInitCaching = false
 
This method returns null starting from version 1.62 all the way upto the latest version 1.68. But when this is run on x86_64 environment where it is tested before deploying on armv8 it retuns a snpe instance. The only change for x86_64 is the runtime is set to zdl::DlSystem::Runtime_t::CPU. I have tried the same runtime for armv8 but the method still returned null.
 
I suspect that the issue might be the zlib version used as that is the only common change I can think of that is relevant in this scenario.
zlib website also notes that for any use of 1.2.12 and below should be upgraded to 1.2.13 due to some bug fix - https://zlib.net. 
 
I can provide any futher details if needed. Any help in resolving this issue would be greatly appriciated. 
 
 
 
 
 
  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sat, 2022-12-10 23:45

Dear developer,

It's intereting issue from your mentioned. Could you please share more logcats to us for more deeply analysis?

BR.

Wei

  • Up0
  • Down0
yashwanth.raj
Join Date: 12 Jul 22
Posts: 2
Posted: Wed, 2022-12-14 02:53

Please find the logs in the link below. It has logs from logcat from the time library is loaded until the crash

https://file.io/iO5x24ZlOxTo

I have tried loading the model from file and the issue still persists. 

When using snpe-net-run, I am getting the 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=508877980912; error_component=Dependent library; line_no=342; thread_id=508911748424

---------------

This error appears only on v1.62 and above and on aarch64-android-clang8.0. On x86_64-linux-clang it runs fine. We had to modify the envsetup.sh scipt to run it on the device with armv8. We just invoked _setup_snpe() method with paths updated to point to aarch64-android-clang8.0 libs and the rest of the script was commented out.

 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.