Fix memory conversion (#19256)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
This commit is contained in:
parent
454f4d579d
commit
4d30f14337
1 changed files with 1 additions and 1 deletions
|
|
@ -493,7 +493,7 @@ class BaseTrainer:
|
||||||
memory = 0
|
memory = 0
|
||||||
else:
|
else:
|
||||||
memory = torch.cuda.memory_reserved()
|
memory = torch.cuda.memory_reserved()
|
||||||
return memory >> (2**30)
|
return memory / (2**30)
|
||||||
|
|
||||||
def _clear_memory(self):
|
def _clear_memory(self):
|
||||||
"""Clear accelerator memory on different platforms."""
|
"""Clear accelerator memory on different platforms."""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue