Stonesjtu / pytorch_memlab

Profiling and inspecting memory in pytorch
MIT License
1.01k stars 37 forks source link

How do I record the maximum memory usage of a script? #51

Open NightMachinery opened 1 year ago

NightMachinery commented 1 year ago

I want to measure the max memory used during the execution of a script.

I think doing this naively will count max reserved memory, while I want the max memory actually used.

I do not need any further details.

Will this have an overhead? I want to do this on scripts taking hours to finish.