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

Method list_logical_devices

tensorflow/python/eager/context.py:1140–1151  ·  view source on GitHub ↗

Return logical devices.

(self, device_type=None)

Source from the content-addressed store, hash-verified

1138 self.set_visible_devices(visible_gpus, "GPU")
1139
1140 def list_logical_devices(self, device_type=None):
1141 """Return logical devices."""
1142 self.ensure_initialized()
1143
1144 devices = []
1145 for dev in self._logical_devices:
1146 if device_type is not None and device_type != dev.device_type:
1147 continue
1148
1149 devices.append(dev)
1150
1151 return devices
1152
1153 def get_visible_devices(self, device_type=None):
1154 """Get the list of visible devices."""

Callers 6

get_deviceFunction · 0.80
list_logical_devicesFunction · 0.80
testCpuMultipleMethod · 0.80
testVirtualGpuMethod · 0.80
testGpuGrowthMethod · 0.80
testRemoteMethod · 0.80

Calls 2

ensure_initializedMethod · 0.95
appendMethod · 0.45

Tested by 5

get_deviceFunction · 0.64
testCpuMultipleMethod · 0.64
testVirtualGpuMethod · 0.64
testGpuGrowthMethod · 0.64
testRemoteMethod · 0.64