MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / get_system_specs

Function get_system_specs

PythonAPI/util/performance_benchmark.py:405–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403
404
405def get_system_specs():
406 str_system = ""
407 cpu_info = cpuinfo.get_cpu_info()
408 str_system += "CPU {} {}. ".format(cpu_info['brand'], cpu_info['family'])
409
410 memory_info = psutil.virtual_memory()
411 str_system += "{:03.2f} GB RAM memory. ".format(memory_info.total / (1024 * 1024 * 1024))
412 nvidia_cmd = shutil.which("nvidia-smi")
413 if nvidia_cmd:
414 str_system += "GPU "
415 gpu_info = GPUtil.getGPUs()
416 for gpu in gpu_info:
417 str_system += "{} ".format(gpu.name)
418
419 return str_system
420
421
422def main(args):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected