facebookresearch / HolisticTraceAnalysis

A library to analyze PyTorch traces.
http://hta.readthedocs.io
MIT License
306 stars 43 forks source link

Add utility to analyze the memory usage of internal trace representation #191

Open fengxizhou opened 1 month ago

fengxizhou commented 1 month ago

🚀 Motivation and context

When we scale up HTA to support large traces, the memory usage of the internal trace representation becomes a concern. A simple memory usage analysis utility can highlight how the memory is used by the trace and reveal where an optimization can be made.

Description

We would like a utility like follows:

analyze_memory_usage(trace_df)

This utility can output the memory usage of the trace_df as follows:

Screenshot 2024-10-22 at 6 44 34 PM

Alternatives

No response

Additional context

No response