MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / gather_machine_configuration

Function gather_machine_configuration

tensorflow/tools/test/system_info_lib.py:41–60  ·  view source on GitHub ↗

Gather Machine Configuration. This is the top level fn of this library.

()

Source from the content-addressed store, hash-verified

39
40
41def gather_machine_configuration():
42 """Gather Machine Configuration. This is the top level fn of this library."""
43 config = test_log_pb2.MachineConfiguration()
44
45 config.cpu_info.CopyFrom(gather_cpu_info())
46 config.platform_info.CopyFrom(gather_platform_info())
47
48 # gather_available_device_info must come before gather_gpu_devices
49 # because the latter may access libcudart directly, which confuses
50 # TensorFlow StreamExecutor.
51 for d in gather_available_device_info():
52 config.available_device_info.add().CopyFrom(d)
53 for gpu in gpu_info_lib.gather_gpu_devices():
54 config.device_info.add().Pack(gpu)
55
56 config.memory_info.CopyFrom(gather_memory_info())
57
58 config.hostname = gather_hostname()
59
60 return config
61
62
63def gather_hostname():

Callers

nothing calls this directly

Calls 8

gather_cpu_infoFunction · 0.85
gather_platform_infoFunction · 0.85
gather_memory_infoFunction · 0.85
gather_hostnameFunction · 0.85
CopyFromMethod · 0.45
addMethod · 0.45
PackMethod · 0.45

Tested by

no test coverage detected