Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions torchtitan/tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def run(self, step_count: int):
)
gc.collect()
elif step_count > 1 and step_count % self.gc_freq == 0:
self.collect("Performing periodical GC collection")
self.collect("Performing periodic GC collection")

@staticmethod
def collect(reason: str, generation: int = 1):
begin = time.monotonic()
gc.collect(generation)
logger.info("[GC] %s %.2f seconds", reason, time.monotonic() - begin)
logger.info("[GC] %s took %.2f seconds", reason, time.monotonic() - begin)


# hardcoded BF16 type peak flops for NVIDIA A100, H100, H200, B200 GPU and AMD MI250, MI300X, AMD MI325X and Intel PVC
Expand Down