Commit c3169c1e authored by Reza Barazesh's avatar Reza Barazesh Committed by Facebook GitHub Bot
Browse files

Revert D48533397: disable recording memory snapshots after dumping

Differential Revision:
D48533397

Original commit changeset: cbf260823172

Original Phabricator Diff: D48533397

fbshipit-source-id: 6ef669973058fc9dc20f3b2839f4d931c3a58c3d
parent 61485c81
...@@ -65,8 +65,6 @@ def log_memory_snapshot(output_dir: str, file_prefix: str = "") -> None: ...@@ -65,8 +65,6 @@ def log_memory_snapshot(output_dir: str, file_prefix: str = "") -> None:
logger.info(f"Logging memory snapshot to {save_dir}") logger.info(f"Logging memory snapshot to {save_dir}")
snapshot = torch.cuda.memory._snapshot() snapshot = torch.cuda.memory._snapshot()
dump_snapshot(save_dir, snapshot) dump_snapshot(save_dir, snapshot)
# disable recording memory history
torch.cuda.memory._record_memory_history(enabled=None)
except Exception as e: except Exception as e:
logger.error(f"Failed to log memory snapshot to {save_dir}: {e}") logger.error(f"Failed to log memory snapshot to {save_dir}: {e}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment