Skip to content

Commit d4e95fc

Browse files
author
Felipe Mello
committed
change to reset_peak_memory_stats
1 parent 9eb3492 commit d4e95fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/forge/observability/perf_tracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _start_memory_tracking(self) -> None:
186186

187187
if should_track:
188188
_set_memory_active(True)
189-
torch.cuda.reset_max_memory_allocated()
189+
torch.cuda.reset_peak_memory_stats()
190190
self._start_mem = torch.cuda.memory_allocated()
191191
self._memory_started = True
192192

@@ -202,7 +202,7 @@ def _stop_memory_tracking(self) -> None:
202202
)
203203
record_metric(f"{self.prefix}/memory_peak_max_gb", peak_mem, Reduce.MAX)
204204
_set_memory_active(False)
205-
torch.cuda.reset_max_memory_allocated()
205+
torch.cuda.reset_peak_memory_stats()
206206
self._memory_started = False
207207

208208
def _record_timing_metrics(

0 commit comments

Comments
 (0)