Forums - Native Sample Code DiagLog issue

5 posts / 0 new
Last post
Native Sample Code DiagLog issue
justabuices
Join Date: 25 Dec 17
Posts: 5
Posted: Mon, 2021-11-22 21:12

I build sample NativeCpp code from snpe-1.55 on Ubuntu x86-64 and run it with CPU runtime.

After running my network, the snpe-sample outputs the output layer and the SNPEDiag.log but when I

check the SNPEDiag.log by using snpe-diagview tool, the all time fields are zero values.

I also run the same network and input image  with snpe-net-run tool, the SNPEDiag.log looks resonable,

it shows all running time of each layer.

What's different of logger between snpe-net-run and NativeCpp?

Thank you.

  • Up0
  • Down0
zhiguol
Join Date: 16 Dec 19
Posts: 25
Posted: Mon, 2021-11-22 23:07

Thanks for reporting this issue. 

We will have look and get back to you. 

Thanks

  • Up0
  • Down0
ronghui
Join Date: 16 Sep 19
Posts: 1
Posted: Tue, 2021-11-23 01:18

Thanks for reporting this question.

Could you please add .setProfilingLevel(zdl::DlSystem::ProfilingLevel_t::DETAILED) in "SetBuilderOptions.cpp" when creating snpe instance, such as:

    snpe = snpeBuilder.setOutputLayers({})
       .setRuntimeProcessorOrder(runtimeList)
       .setUseUserSuppliedBuffers(useUserSuppliedBuffers)
       .setPlatformConfig(platformConfig)
       .setInitCacheMode(useCaching)
       .setPerformanceProfile(zdl::DlSystem::PerformanceProfile_t::POWER_SAVER)
       .setProfilingLevel(zdl::DlSystem::ProfilingLevel_t::DETAILED)   //or MODERATE 
       .build();
 
 
Thanks.
  • Up0
  • Down0
justabuices
Join Date: 25 Dec 17
Posts: 5
Posted: Tue, 2021-11-23 18:21

Hi ronghui,

I appreciate your fast support and the solution works well. The result is the same as snpe-net-run tool. ^^

I am wondering can we have the access right to the source code of snpe-net-run? it is because I am facing another dsp issue

The same network can run on snpe-net-run with dsp runtime but failed on snpe-sample.

Is there anything we should modify for snpe-sample in order to use dsp runtime?

Our platform info: aarch64-android-clang6.0 and dsp_v66

Thank you.

  • Up0
  • Down0
zhiguol
Join Date: 16 Dec 19
Posts: 25
Posted: Wed, 2021-11-24 17:51

Sorry, netrun code is not open. 

You can add dsp runtime as below:

in "SetBuilderOptions.cpp" when creating snpe instance, such as:

    snpe = snpeBuilder.setOutputLayers({})
       .setRuntimeProcessorOrder(runtimeList) <-Add DSP runtime here.
       .setUseUserSuppliedBuffers(useUserSuppliedBuffers)
       .setPlatformConfig(platformConfig)
       .setInitCacheMode(useCaching)
       .setPerformanceProfile(zdl::DlSystem::PerformanceProfile_t::POWER_SAVER)
       .setProfilingLevel(zdl::DlSystem::ProfilingLevel_t::DETAILED)   //or MODERATE 
 
Thanks.
  • 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.