I am trying to run the SNPE Android tutorial on S22 Ultra device. I have validated DSP support using the snpe-platform-validator command.
The android tutorial shown at Snapdragon Neural Processing Engine SDK: Android Tutorial (qualcomm.com) works fine for CPU and GPU runtimes, but crashes and gives the following error in case of DSP:
--------- beginning of crash11-30 02:53:31.410 30375 30436 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #311-30 02:53:31.410 30375 30436 E AndroidRuntime: Process: com.qualcomm.qti.snpe.imageclassifiers, PID: 3037511-30 02:53:31.410 30375 30436 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()11-30 02:53:31.410 30375 30436 E AndroidRuntime: at android.os.AsyncTask$4.done(AsyncTask.java:415)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:250)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:269)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.lang.Thread.run(Thread.java:1012)11-30 02:53:31.410 30375 30436 E AndroidRuntime: Caused by: com.qualcomm.qti.snpe.SnpeError$NativeException: Unable to create network! Cause: error_code=401; error_message=Network creation has failed. error_code=401; error_message=Network creation has failed. QnnGraph_finalize failed: 75546; error_component=Dl Network; line_no=796; thread_id=470243728560; error_component=Dl Network; line_no=342; thread_id=47215129310411-30 02:53:31.410 30375 30436 E AndroidRuntime: at com.qualcomm.qti.snpe.SnpeError.getSnpeNativeError(SnpeError.java:35)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at com.qualcomm.qti.snpe.internal.NativeNetwork.<init>(NativeNetwork.java:135)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at com.qualcomm.qti.snpe.SNPE$NeuralNetworkBuilder.build(SNPE.java:421)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at com.qualcomm.qti.snpe.imageclassifiers.tasks.LoadNetworkTask.doInBackground(LoadNetworkTask.java:70)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at com.qualcomm.qti.snpe.imageclassifiers.tasks.LoadNetworkTask.doInBackground(LoadNetworkTask.java:22)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at android.os.AsyncTask$3.call(AsyncTask.java:394)11-30 02:53:31.410 30375 30436 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:264)
11-30 02:53:31.410 30375 30436 E AndroidRuntime: ... 4 more
Please let me know if I am missing anything or if any other pre-requisites are needed that are not mentioned on the tutorial page.
Dear developer,
What's SNPE version you are testing?
You can help to check below,
1 Model need to quantize if run on cDSP runtime.
2 unsingedPD:OFF is added to snpe-net-run or sample code.
BR.
Wei
As mentioned in document,
https://developer.qualcomm.com/sites/default/files/docs/snpe/dsp_runtime...
Hope this resolve your problem.
Regards,
Sahil Bandar
Hi weihuan,
I am using SNPE 1.66.0.3729 for this.
I have checked the above mentioned points:
1. I am using the `inception_v3_quantized.dlc` model for running this tutorial.
2. unsignedPD:OFF is added to the sample code.
I have also tried running after checking for the above points and the error is still the same.
Thanks.