Forums - C API Error

2 posts / 0 new
Last post
C API Error
adrien.pierret
Join Date: 10 May 23
Posts: 5
Posted: Mon, 2023-05-15 19:21
Hello everyone,
 
While porting my code from the C++ API (SDK 1.6) to the C API (2.9), I ran into the following error:
 
[1] QnnDsp <E> Unsupported SnapdragonModel = 0 by HTP backend, assuming fp16 is not supported
 
This happens after the following lines:
 
Snpe_DlContainer_Handle_t container;
container = Snpe_DlContainer_Open(MODEL_NAME);
 
Snpe_RuntimeList_Handle_t runtimeList = Snpe_RuntimeList_Create();
Snpe_RuntimeList_Add(runtimeList, SNPE_RUNTIME_CPU); // I checked the returned code, no error
Snpe_StringList_Handle_t outputTensorNames = Snpe_StringList_CreateSize(outputInfo.size());
 
for (auto info : outputInfo)
{
Snpe_StringList_Append(outputTensorNames, info.first.data());
}
 
Snpe_SNPEBuilder_Handle_t snpeBuilder = Snpe_SNPEBuilder_Create(container);
Snpe_SNPEBuilder_SetOutputTensors(snpeBuilder, outputTensorNames);// I checked the returned code, no error
Snpe_SNPEBuilder_SetRuntimeProcessorOrder(snpeBuilder, runtimeList);// I checked the returned code, no error
Snpe_SNPEBuilder_SetInitCacheMode(snpeBuilder, false);// I checked the returned code, no error
Snpe_SNPE_Handle_t snpe = Snpe_SNPEBuilder_Build(snpeBuilder); // error appear within that function call
 
The code nonetheless compiles fine. However, as there is no model loaded because of that error, there is also no detection later on.
If I use the following before the builder:
 
Snpe_SNPEBuilder_SetCpuFixedPointMode(snpeBuilder, true);
 
The error diseappear but I end up with nullptr when I try to access anything with function such as getInputTensorNames().
 
Finally, the various models I am using were transformed from ONNX to DLC using the  snpe-onnx-to-dlc tool provided with the SDK. The convertions were made without any error.
  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Fri, 2023-05-19 06:08

Dear developer,

How abou the execution on qnn-net-run?

BR.

Wei

  • 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.