Forums - java.lang.OutOfMemoryError on snpe java sdk where infer yolov8s.dlc

1 post / 0 new
java.lang.OutOfMemoryError on snpe java sdk where infer yolov8s.dlc
zfuqiong
Join Date: 17 Nov 23
Posts: 1
Posted: Mon, 2023-11-20 01:30

Hi,

I tried to infer yolov8s.dlc using snpe java sdk. But i got some errors, like 

java.lang.OutOfMemoryError: Failed to allocate a 449593968 byte allocation with 8103942 free bytes and 248MB until OOM, target footprint 16207886, growth limit 268435456

                                                                                                    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:54)
                                                                                                    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:49)
                                                                                                    at java.nio.ByteBuffer.allocate(ByteBuffer.java:284)
                                                                                                    at com.qualcomm.qti.snpe.internal.util.JniOutputBundle.<init>(JniOutputBundle.java:16)
                                                                                                    at com.qualcomm.qti.snpe.internal.NativeNetwork.nativeForward(Native Method)
                                                                                                    at com.qualcomm.qti.snpe.internal.NativeNetwork.execute(NativeNetwork.java:173)
                                                                                                    at com.ifreeai.snpedemo.task.SNPETask.execute(SNPETask.kt:71)
                                                                                                    at com.ifreeai.snpedemo.MainActivity.onCreate(MainActivity.kt:28)
                                                                                                    at android.app.Activity.performCreate(Activity.java:8759)
                                                                                                    at android.app.Activity.performCreate(Activity.java:8723)
                                                                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
                                                                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3975)
                                                                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4139)
                                                                                                    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
                                                                                                    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                                                                                                    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                                                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2552)
                                                                                                    at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    at android.os.Looper.loopOnce(Looper.java:223)
                                                                                                    at android.os.Looper.loop(Looper.java:324)
                                                                                                    at android.app.ActivityThread.main(ActivityThread.java:8538)
                                                                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
                                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1059)
 
 

 

  • Up0
  • Down0

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.