Fix bytes to GB conversion for logged VRAM usage (#19254)

Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Mohammed Yasin 2025-02-15 15:25:53 +08:00 committed by GitHub
parent d317b26940
commit 454f4d579d
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 / 1e9
return memory >> (2**30)
def _clear_memory(self):
"""Clear accelerator memory on different platforms."""