ThanatosShinji / onnx-tool

A parser, editor and profiler tool for ONNX models.
https://pypi.org/project/onnx-tool/
MIT License
399 stars 52 forks source link

The meaning of metric 'memory' in the profile result #16

Closed miniTsl closed 1 year ago

miniTsl commented 1 year ago

Is anybody so kind to help explain what the metric 'memory' stands for exactly in the profile result? I figure it covers the memory usage caused by model parameters and inference intermediate data… Thanks so much!!!

ThanatosShinji commented 1 year ago

I figure it covers the memory usage caused by model parameters and inference intermediate data

Actually, this is what it means. The bytes count of parameters and output tensors(default as float). For some 4k resolution CV models, this may be useful to decrease memory usage. BTW, most inference frameworks will reuse intermediate data. So the memory count will be larger than the real inference case.

miniTsl commented 1 year ago

Thank you so much!