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

Function gather_available_device_info

tensorflow/tools/test/system_info_lib.py:122–139  ·  view source on GitHub ↗

Gather list of devices available to TensorFlow. Returns: A list of test_log_pb2.AvailableDeviceInfo messages.

()

Source from the content-addressed store, hash-verified

120
121
122def gather_available_device_info():
123 """Gather list of devices available to TensorFlow.
124
125 Returns:
126 A list of test_log_pb2.AvailableDeviceInfo messages.
127 """
128 device_info_list = []
129 devices = device_lib.list_local_devices()
130
131 for d in devices:
132 device_info = test_log_pb2.AvailableDeviceInfo()
133 device_info.name = d.name
134 device_info.type = d.device_type
135 device_info.memory_limit = d.memory_limit
136 device_info.physical_description = d.physical_device_desc
137 device_info_list.append(device_info)
138
139 return device_info_list
140
141
142def gather_platform_info():

Callers 1

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected