Gather Machine Configuration. This is the top level fn of this library.
()
| 39 | |
| 40 | |
| 41 | def 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 | |
| 63 | def gather_hostname(): |
nothing calls this directly
no test coverage detected