Fix memory conversion (#19256)

Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
This commit is contained in:
Mohammed Yasin 2025-02-17 14:32:09 +08:00 committed by GitHub
parent 454f4d579d
commit 4d30f14337
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -493,7 +493,7 @@ class BaseTrainer:
memory = 0
else:
memory = torch.cuda.memory_reserved()
return memory >> (2**30)
return memory / (2**30)
def _clear_memory(self):
"""Clear accelerator memory on different platforms."""