[Platform] move current_memory_usage() into platform (#11369)

Signed-off-by: Shanshan Shen <467638484@qq.com>
This commit is contained in:
Shanshan Shen
2025-01-15 03:38:25 +00:00
committed by GitHub
parent 1a51b9f872
commit 9ddac56311
5 changed files with 31 additions and 7 deletions
+9
View File
@@ -277,6 +277,15 @@ class Platform:
return False
return True
@classmethod
def get_current_memory_usage(cls,
device: Optional[torch.types.Device] = None
) -> float:
"""
Return the memory usage in bytes.
"""
raise NotImplementedError
@classmethod
def get_punica_wrapper(cls) -> str:
"""