MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / cpu_mem_usage

Function cpu_mem_usage

slowfast/utils/misc.py:64–75  ·  view source on GitHub ↗

Compute the system memory (RAM) usage for the current device (GB). Returns: usage (float): used memory (GB). total (float): total memory (GB).

()

Source from the content-addressed store, hash-verified

62
63
64def cpu_mem_usage():
65 """
66 Compute the system memory (RAM) usage for the current device (GB).
67 Returns:
68 usage (float): used memory (GB).
69 total (float): total memory (GB).
70 """
71 vram = psutil.virtual_memory()
72 usage = (vram.total - vram.available) / 1024 ** 3
73 total = vram.total / 1024 ** 3
74
75 return usage, total
76
77
78def _get_model_analysis_input(cfg, use_train_input):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected