You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix a corner-case bug in memory snapshot uploading (#3504)
Summary:
Pull Request resolved: #3504
Fixed two corner case issues in the TorchRec benchmark utilities:
1. **Memory snapshot handling**: Added rank filtering for memory snapshot operations to ensure they only run on rank 0 or when `all_rank_traces` is enabled. This prevents redundant memory snapshots from being taken on all ranks, reducing overhead and storage requirements while still capturing the necessary profiling data.
2. **Shell script robustness**: Added file existence checks before loop iterations in the trace upload script. Previously, if no trace files or memory snapshot files were found, the script would fail silently or produce errors. Now it checks with `ls` first and only proceeds with the loop if files exist, preventing issues when the trace directory is empty or files don't match the expected patterns.
Reviewed By: spmex
Differential Revision: D86051540
fbshipit-source-id: 6371d3dc20285903cb59c1dc74017f70f1f9fceb
0 commit comments