MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_mem_status_bytes

Function get_mem_status_bytes

imperative/python/megengine/device.py:154–159  ·  view source on GitHub ↗

r"""Get total and free memory on the computing device in bytes.

(device: Optional[str] = None)

Source from the content-addressed store, hash-verified

152
153
154def get_mem_status_bytes(device: Optional[str] = None):
155 r"""Get total and free memory on the computing device in bytes."""
156 if device is None:
157 device = get_default_device()
158 tot, free = CompNode(device).get_mem_status_bytes
159 return tot, free
160
161
162def get_cuda_compute_capability(device: int, device_type=DeviceType.CUDA) -> int:

Callers 1

get_free_memMethod · 0.85

Calls 2

CompNodeClass · 0.85
get_default_deviceFunction · 0.70

Tested by

no test coverage detected