gc logging

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-10-23 07:58:09 -04:00
parent bf6f130f38
commit 0587f0be0c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ def torch_gc(force=False, fast=False):
if 'gc' not in timer.process.records:
timer.process.records['gc'] = 0
timer.process.records['gc'] += t1 - t0
if not force:
if not force or collected == 0:
return
mem = memstats.memory_stats()
saved = round(gpu.get('used', 0) - mem.get('gpu', {}).get('used', 0), 2)