Forums - Unable to release managed tensor!

5 posts / 0 new
Last post
Unable to release managed tensor!
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Sun, 2017-09-17 15:06

Hi,

Getting this error using GPU runtime on MotoZ (SnapDragon 620 - MSM8996) on Nougat 7.0 (NPLS25.86-17-3-8)

09-17 14:55:53.641 14179-14376 D/snpe-android: Network forward took 416 ms
09-17 14:55:53.691 14179-14188 E/System: Uncaught exception thrown by finalizer
09-17 14:55:53.692 14179-14188 E/System: java.lang.IllegalStateException: Unable to release managed tensor!
                                             at com.qualcomm.qti.snpe.internal.NativeFloatTensor.nativeRelease(Native Method)
                                             at com.qualcomm.qti.snpe.internal.NativeFloatTensor.doRelease(NativeFloatTensor.java:99)
                                             at com.qualcomm.qti.snpe.internal.NativeFloatTensor.finalize(NativeFloatTensor.java:85)
                                             at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)
                                             at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)
                                             at java.lang.Thread.run(Thread.java:761)

 

FloatTensor tensor = snpeNetwork.createFloatTensor(snpeInputDimensions);
tensor.write(floatImg.dataAddr(), 0, tensor.getSize(), 0);
final Map<String, FloatTensor> inputs = new HashMap<>();
inputs.put("data", tensor);
final Map<String, FloatTensor> outputs = snpeNetwork.execute(inputs);
tensor.release();

 

Same error occurs with or without tensor.release() call.

Thanks.

Rex

  • Up0
  • Down0
howie.hxu
Join Date: 26 Dec 17
Posts: 2
Posted: Mon, 2018-02-12 00:15

I have met the same problem. 

Did anyone who solved it ?

  • Up0
  • Down0
howie.hxu
Join Date: 26 Dec 17
Posts: 2
Posted: Mon, 2018-02-12 00:15

I have met the same problem. 

Did anyone who solved it ?

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Wed, 2018-02-14 12:55

I solved the problem by using the native equivalent function but we can't mix native and Java access to the same SNPE object so we just carry around the error with our Java version. It seems to be harmless.

  • Up0
  • Down0
csdncannon
Join Date: 1 Sep 16
Posts: 2
Posted: Wed, 2018-04-11 20:35

You have to explicitely release all input & output FloatTensors, will update the documents later on.

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.