ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.15k stars 307 forks source link

armnn_v21_08 memory usage #586

Closed dongmunha closed 2 years ago

dongmunha commented 2 years ago

When I run "sample/ObjectionDetection" using the YOLOv3 model, the memory usage increases about 2.5 times more than the previous version (armnn_21_05). I want to know what is the cause.

Colm-in-Arm commented 2 years ago

Hi @dongmunha,

Can you give me some more details please:

Colm.

dongmunha commented 2 years ago

Thanks for the reply. The answer to your request is as follows.

  1. Architecture : ARM Cortex-A9 dual core
  2. Backbone in use: Tiny YOLOv3
  3. Source code of the YOLOv3 model : I downloaded the model and weight files from the darknet official site and used them after converting them into tensorflow lite format. The resource I used can be downloaded from the link below. 1) model file : https://github.com/pjreddie/darknet/blob/master/cfg/yolov3-tiny.cfg 2) weight : https://pjreddie.com/media/files/yolov3-tiny.weights
Colm-in-Arm commented 2 years ago

Hi @dongmunha,

My first concern here is you are using a v7 core. Arm NN and ACL are not optimized to run on v7. There was a discussion about this on community.arm.com

Each release of Arm NN and ACL strives to improve performance on aarch64 hardware and it's possible that improvments in the 21.08 release could negatively effect execution on v7. As Ben Clark put it in that conversation:

"Arm v7 is >10 years old now (Arm v9 is out!), so the Arm NN team need to focus their resources on more recent technologies. Yes, it's a shame that they're not getting to it, but they can't do everything."

Perhaps you could try using the TfLite runtime and comparing performance and memory footprint with your model. I'd be interested in know how it works out.

Colm.

MikeJKelly commented 2 years ago

Closing as I think this issue has been resolved. If you have any further questions then please open another issue.

Best regards, Mike