Skip to content

Commit

Permalink
Improving memory snapshot (mosaicml#3315)
Browse files Browse the repository at this point in the history
* add all stack trace

* Update memory_snapshot.py

* Update memory_snapshot.py

---------

Co-authored-by: Charles Tang <[email protected]>
  • Loading branch information
cli99 and j316chuck committed May 28, 2024
1 parent 91f2945 commit 1c1f36e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions composer/callbacks/memory_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ def start_record_memory_history(self) -> None:

log.info('Starting snapshot record_memory_history')
torch.cuda.memory._record_memory_history(
True, # type: ignore
trace_alloc_max_entries=self.max_entries,
trace_alloc_record_context=True,
'all', # type: ignore
max_entries=self.max_entries,
)

def stop_record_memory_history(self) -> None:
Expand Down

0 comments on commit 1c1f36e

Please sign in to comment.