r"""Returns the current 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)
| 186 | |
| 187 | |
| 188 | def get_allocated_memory(device: Optional[str] = None): |
| 189 | r"""Returns the current memory occupied by tensors on the computing device in bytes. |
| 190 | |
| 191 | Due to the asynchronous execution of MegEngine, please call megengine._full_sync |
| 192 | before calling this function in order to get accurate value. |
| 193 | """ |
| 194 | if device is None: |
| 195 | device = get_default_device() |
| 196 | return CompNode(device).get_used_memory |
| 197 | |
| 198 | |
| 199 | def get_reserved_memory(device: Optional[str] = None): |
nothing calls this directly
no test coverage detected