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.17k stars 310 forks source link

Display memory usage in Arm NN #598

Closed Rahn80643 closed 2 years ago

Rahn80643 commented 2 years ago

Hi,

In ArmNN, the execution time of the model can be observed in program "ExecuteNetwork". However, the program seems not provide the information of memory usage, is it possible to know the memory usage in GPU or NPU?

Best Regards, Rahn

MikeJKelly commented 2 years ago

Hi @Rahn80643

there is no way to get profile the memory directly using ExecuteNetwork but we've used Valgrind massif to do that in the past: https://valgrind.org/docs/manual/ms-manual.html

Using Valgrind Massif will get you GPU memory usage but won't get you much from the NPU. However, if you build your NPU kernel module in debug and run any network then the debug should output the amount of memory allocated in kernel space by the Ethos-N driver.

Best regards, Mike

MikeJKelly commented 2 years ago

Closing as I believe this has been resolved. If you have any further questions then please reopen this or create a new issue.