This application runs on CPU correctly but when we try to use DSP,
we got following output and the program failed at Snpe_SNPEBuilder_Build():
2024-11-14 10:06:51.154 17427-17575 SNPE-DebugLog I 10:06:51.154156 [USER_INFO:SNPE] Logging initialized
2024-11-14 10:06:51.154 17427-17575 SNPE-DebugLog I 10:06:51.154210 [USER_INFO:SNPE] SNPE isRuntimeAvailable runtime - 2, option - 2
2024-11-14 10:06:51.159 17427-17575 SNPE-DebugLog I 10:06:51.159623 [USER_INFO:SNAPDNN] SNPEBuilder Runtime - 2, Profile - 0, Profiling Level - 0, Execution Priority - 0, User Buffer - 1, Debug Mode - 0, CPU Fallback - 0, Init Cache - 0, CPU Fixed Point Mode - 0
2024-11-14 10:06:51.159 17427-17575 SNPE-DebugLog I 10:06:51.159780 [USER_INFO:HTP_CACHE] Target device backend record identifier: HTP_V68_SM7325_2MB
2024-11-14 10:06:51.159 17427-17575 SNPE-DebugLog I 10:06:51.159846 [USER_INFO:HTP_CACHE] No cache record in the DLC matches the target device (HTP_V68_SM7325_2MB). Creating a new record
2024-11-14 10:06:51.159 17427-17575 SNPE-DebugLog W 10:06:51.159863 [USER_WARN:HTP_CACHE] Cannot perform accelerated HTP init without a valid and complete cache record
2024-11-14 10:06:51.159 17427-17575 SNPE-DebugLog I 10:06:51.159869 [USER_INFO:HTP_CACHE] Performing regular HTP cache-based init
2024-11-14 10:06:51.161 17427-17575 SNPE-DebugLog V 10:06:51.161918 [USER_VERBOSE:HTP_CACHE] Number of ops in validation cache record (0) does not match the size of the network (100)
2024-11-14 10:06:51.161 17427-17575 SNPE-DebugLog I 10:06:51.161956 [USER_INFO:HTP_CACHE] No validation cache record found. Validating network and renewing validation cache
2024-11-14 10:06:51.162 17427-17575 SNPE-DebugLog I 10:06:51.162239 [USER_INFO:DNN_RUNTIME] Validation for Op=/model.0/conv/Conv Type=Conv2d at pos=1 successful for runtime=2
2024-11-14 10:06:51.162 17427-17575 SNPE-DebugLog I 10:06:51.162288 [USER_INFO:DNN_RUNTIME] Validation for Op=/model.0/act/Tanh Type=Neuron at pos=2 successful for runtime=2
...
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog V 10:06:51.169350 [USER_VERBOSE:DNN_RUNTIME] Added network input transition for images
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog V 10:06:51.169620 [USER_VERBOSE:DNN_RUNTIME] Added network output transition for 364
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog V 10:06:51.169662 [USER_VERBOSE:DNN_RUNTIME] Added network output transition for 366
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog I 10:06:51.169713 [USER_INFO:DNN_RUNTIME] Subnet Partitions:
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog V 10:06:51.169729 [USER_VERBOSE:DNN_RUNTIME] Total Subnets Count: 1
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog W 10:06:51.169839 [USER_WARN:HTP_CACHE] Nothing to validate: No valid graph cache detected
2024-11-14 10:06:51.169 17427-17575 SNPE-DebugLog I 10:06:51.169885 [USER_INFO:DNN_RUNTIME] Building network with the following user config:
2024-11-14 10:06:51.170 17427-17575 SNPE-DebugLog I 10:06:51.170353 [USER_INFO:DNN_RUNTIME] Platform option not set
2024-11-14 10:06:51.170 17427-17575 SNPE-DebugLog E 10:06:51.170556 [USER_ERROR:DNN_RUNTIME] <E> No Device and Core not registered for power config id 0
2024-11-14 10:06:51.170 17427-17575 SNPE-DebugLog E 10:06:51.170588 [USER_ERROR:DNN_RUNTIME] <E> Failed to find power config id 0
2024-11-14 10:06:51.170 17427-17575 SNPE-DebugLog E 10:06:51.170596 [USER_ERROR:DNN_RUNTIME] <E> Failed to destroy powerConfigId with error 0x32c9
2024-11-14 10:06:51.172 17427-17575 SNPE-DebugLog I 10:06:51.172382 [USER_INFO:DNN_RUNTIME] Created ctx=1 for Snpe Unique Graph ID=0 backend=3 instancePtr=0xb40000764ca22438
2024-11-14 10:06:51.175 17427-17575 QnnDsp E tcm_migration.cc:312:ERROR:Memory properties specified twice for operator
2024-11-14 10:06:51.175 17427-17575 QnnDsp E tcm_migration.cc:312:ERROR:Memory properties specified twice for operator
2024-11-14 10:06:51.175 17427-17575 QnnDsp E tcm_migration.cc:312:ERROR:Memory properties specified twice for operator
...
2024-11-14 10:06:51.361 17427-17575 SNPE-DebugLog I 10:06:51.361009 [USER_INFO:HTP_CACHE] No valid context cache found for graph (HTP subnet #0). Creating graph from scratch
2024-11-14 10:06:51.435 17427-17575 SNPE-DebugLog E 10:06:51.435784 [USER_ERROR:DNN_RUNTIME] graph_prepare.cc:2381:ERROR:Graph prepare failed during optimization with err:17
2024-11-14 10:06:51.435 17427-17575 SNPE-DebugLog E 10:06:51.435864 [USER_ERROR:DNN_RUNTIME] <E> RouterFastRPC graph prepare failed 17
2024-11-14 10:06:51.435 17427-17575 SNPE-DebugLog E 10:06:51.435895 [USER_ERROR:DNN_RUNTIME] <E> Failed to finalize graph (id: 1) with err 1002
2024-11-14 10:06:51.435 17427-17575 SNPE-DebugLog E 10:06:51.435911 [USER_ERROR:DNN_RUNTIME] error code = 401; QnnGraph_finalize failed: 1002
2024-11-14 10:06:51.435 17427-17575 SNPE-DebugLog I 10:06:51.435948 [USER_INFO:DNN_RUNTIME] Backend Mgr ~Dtor called for backend HTP
2024-11-14 10:06:51.435 17427-17575 SNPE-DebugLog I 10:06:51.435959 [USER_INFO:DNN_RUNTIME] Cleaning up Context=1 for Snpe Unique Graph ID=0 backend=3 instancePtr=0xb40000764ca22438
2024-11-14 10:06:51.439 17427-17575 SNPE-DebugLog I 10:06:51.439963 [USER_INFO:DNN_RUNTIME] DONE Cleaning up Context=1 for Snpe Unique Graph ID=0 backend=3 instancePtr=0xb40000764ca22438
2024-11-14 10:06:51.440 17427-17575 SNPE-DebugLog E 10:06:51.440713 [USER_ERROR:SNAPDNN] 401 | QnnGraph_finalize failed: 1002
2024-11-14 10:06:51.440 17427-17575 SNPE-DebugLog I 10:06:51.440778 [USER_INFO:DNN_RUNTIME] Cleaning up cluster manager instance resources
However, this same code and DLC files can be run as an executable on the DSP.
We also have tried to run example Solutions Sentiment Analysis. It failed on DSP too.
Are there any clues that could help us troubleshoot the issue?
We have followed https://github.com/quic/qidk/tree/master/Solutions/VisionSolution1-ObjectDetection-YoloNas#build-apk-file-with-android-studio to run our models in an Android application on DSP.
This application runs on CPU correctly but when we try to use DSP, we got following output and the program failed at Snpe_SNPEBuilder_Build():
However, this same code and DLC files can be run as an executable on the DSP.
We also have tried to run example Solutions Sentiment Analysis. It failed on DSP too.
Are there any clues that could help us troubleshoot the issue?