quic / qidk

Other
94 stars 18 forks source link

undefined reference to `Snpe_TensorShape_Set' #9

Closed Sanath1998 closed 7 months ago

Sanath1998 commented 7 months ago

Hi @quic-rneti, @quic-shubpate , @quic-ppant , I was able to sync the gradle successfully and while building the projectw as getting the below error.

CMakeFiles/objectdetectionYoloNas.dir/inference_helper.cpp.o:(.debug_info+0x3246): undefined reference to Snpe_TensorShape_Set' CMakeFiles/objectdetectionYoloNas.dir/objectdetectionYoloNas.cpp.o:(.debug_info+0x1f6c7): undefined reference toSnpe_TensorShape_Set' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.

Is there any thing which I want to do from my end. I have even checked the CMakeLists.txt inside VisionSolution1-ObjectDetection-YoloNas\app\src\main\cpp\ path and all its correct.

If possible could you please help out on this?

quic-shubpate commented 7 months ago

Hi @Sanath1998 , Please ensure that you are pushing libSNPE.so from Linux variant of SNPE SDK into the jniLibs directory.

On qpm.qualcomm.com, there will be SNPE SDK for Windows and Linux. Since we are developing for Android, so you have to download the Linux variant of SNPE SDK and use the libraries from it.

You can also confirm whether symbol is present in libSNPE.so using the nm command.

Sanath1998 commented 7 months ago

Is there any link from where I can download SNPE SDK? IF yes, that would have been very helpful for us.

Actually one thing what I want to say is, android application I'm running is on windows machine, so SNPE SDK of Linux Variant will support windows environment machine uh?

quic-ppant commented 7 months ago

Hi,

You can download it from this link https://qpm.qualcomm.com/#/main/tools/find Search for Qualcomm ai and then click on drop down "Qualcomm@ AI stack" after that click on “Qualcomm Neural processing sdk”. This is the snpe sdk. For windows you can install directly and for linux the procedure can be found after you click on the sdk. Once you are able to extract the sdk. Please, check sdk documentation for setup.

For android please use linux variant of sdk.

Sanath1998 commented 7 months ago

Hi @quic-rneti @quic-shubpate @quic-ppant

we have followed the below link to resolve some dependencies. https://github.com/quic/qidk/blob/master/Solutions/VisionSolution1-ObjectDetection-YoloNas/resolveDependencies.sh

SNPE version we have build in linux environment and the SNPE version is 2.10.0.4541.

Is there any particular version which we want to try with SNPE?

Sanath1998 commented 7 months ago

Hi,

You can download it from this link https://qpm.qualcomm.com/#/main/tools/find Search for Qualcomm ai and then click on drop down "Qualcomm@ AI stack" after that click on “Qualcomm Neural processing sdk”. This is the snpe sdk. For windows you can install directly and for linux the procedure can be found after you click on the sdk. Once you are able to extract the sdk. Please, check sdk documentation for setup.

For android please use linux variant of sdk.

image They have given no supported documents.

quic-rneti commented 7 months ago

Sample documentation path for Windows SDK : C:\Qualcomm\AIStack\SNPE\2.19.0.240124\docs\SNPE\html\index.html

SDK_ROOT would be C:\Qualcomm\AIStack\SNPE\2.19.0.240124\ Similarly in Linux. It is always recommended to use the latest SDK version.

Sanath1998 commented 7 months ago

Hi @quic-rneti @quic-shubpate @quic-ppant, sorry to ask one thing.

Actually we want to replicate same as https://github.com/quic/qidk/tree/master/Solutions/VisionSolution1-ObjectDetection-YoloNas as given above. But we are getting some errors in the android applications which is leading us for errors.

Errors:-

image What is the issue for this errors. Actually we have followed all the steps mentioned in the Resolvdependencies.sh file.

And do we have to change any CmakeLists.txt to link any files? Because undefined reference comes when files are not properly interlinked. Please if any resolution is there it would be very helpful.