MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / total_memory

Method total_memory

accelerator/cpu_accelerator.py:333–337  ·  view source on GitHub ↗
(self, device_index=None)

Source from the content-addressed store, hash-verified

331 return self.max_mem
332
333 def total_memory(self, device_index=None):
334 import psutil
335 total = psutil.virtual_memory().total
336 cgroup = _cgroup_memory()
337 return total if cgroup is None else min(total, cgroup[0])
338
339 def available_memory(self, device_index=None):
340 import psutil

Callers

nothing calls this directly

Calls 1

_cgroup_memoryFunction · 0.85

Tested by

no test coverage detected