Forums - SNPE 1.18.0 Example

2 posts / 0 new
Last post
SNPE 1.18.0 Example
wonshik.kim
Join Date: 29 Aug 18
Posts: 1
Posted: Sun, 2018-09-16 20:15

I am trying to test the SNPE on my phone (LG G7 SDM845)

I made the test app as you provied in your website (there some minor bugs on that).

anyway, when I run the app, there is no option for gpu or dsp acceleration both alexnet and inception_v3. there is only option for cpu.

1. If I try to use GPU and DSP option on this app, what should I do?

2. If my phone is not sutable for this test, What kind of SDM845 based commercial phone can accelerate the snpe DSP and GPU?

 

  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Tue, 2019-09-17 05:08

Hi,

1. GPU, DSP runtime can be set while building Neural Network using the code below:

 NeuralNetwork network = new SNPE.NeuralNetworkBuilder(application)
                    .setDebugEnabled(false)
//outputLayerNames = predictions_1/Softmax
                    .setOutputLayers(outputLayerNames)
//Input stream of converted_model.dlc
                    .setModel(assetInputStream, assetInputStream.available())
                    .setPerformanceProfile(NeuralNetwork.PerformanceProfile.DEFAULT)
//NeuralNetwork.Runtime.GPU_FLOAT16(for GPU), NeuralNetwork.Runtime.GPU,NeuralNetwork.Runtime.CPU(for CPU)
                    .setRuntimeOrder(NeuralNetwork.Runtime.DSP) 
                    .setCpuFallbackEnabled(needsCpuFallback)
                    .build();
2.LG G7 device specifications include GPU(Adreno 630). So the test can be with  NeuralNetwork.Runtime.GPU as runtime.

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