How to extarct Memory profiling?

Hello I’m using Resnet18, Resnet50 as an AOT bundle now. When the test image is inputted, the inference time and the confidence can be confirmed to be output. Furthermore, I want to check memory usage or memory transfer. What should I do to check? Do I have to implement it directly on the code?

You should be able to use these structs that are autogenerated and should be included in the main function you write in in the C++ that drives inference:

E.g. using the BundleConfig you can understand the total memory usage of the network itself, such as the size of constant weights, etc. Aside from that if you need more info about data transfer then yes you would need to take a look at the actual data you’re passing into the network in the C++ file that drives inference.