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

Method get_visible_devices

tensorflow/python/eager/context.py:1153–1162  ·  view source on GitHub ↗

Get the list of visible devices.

(self, device_type=None)

Source from the content-addressed store, hash-verified

1151 return devices
1152
1153 def get_visible_devices(self, device_type=None):
1154 """Get the list of visible devices."""
1155 self._initialize_physical_devices()
1156
1157 if device_type is None:
1158 return self._visible_device_list
1159 else:
1160 return [
1161 d for d in self._visible_device_list if d.device_type == device_type
1162 ]
1163
1164 def set_visible_devices(self, devices, device_type=None):
1165 """Set the list of visible devices."""

Callers 3

get_visible_devicesFunction · 0.80
testGpuNoneMethod · 0.80
_get_visible_devicesFunction · 0.80

Calls 1

Tested by 1

testGpuNoneMethod · 0.64