r"""Returns the maximum memory occupied by tensors on the computing device in bytes. Due to the asynchronous execution of MegEngine, please call megengine._full_sync before calling this function in order to get accurate value.
(device: Optional[str] = None)
| 219 | |
| 220 | |
| 221 | def get_max_allocated_memory(device: Optional[str] = None): |
| 222 | r"""Returns the maximum memory occupied by tensors on the computing device in bytes. |
| 223 | |
| 224 | Due to the asynchronous execution of MegEngine, please call megengine._full_sync |
| 225 | before calling this function in order to get accurate value. |
| 226 | """ |
| 227 | if device is None: |
| 228 | device = get_default_device() |
| 229 | return CompNode(device).get_max_used_memory |
| 230 | |
| 231 | |
| 232 | def reset_max_memory_stats(device: Optional[str] = None): |
nothing calls this directly
no test coverage detected