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

Class PhysicalDevice

tensorflow/python/eager/context.py:271–289  ·  view source on GitHub ↗

Abstraction for a locally visible physical device. TensorFlow can utilize various devices such as the CPU or multiple GPUs for computation. Before initializing a local device for use, the user can customize certain properties of the device such as it's visibility or memory configuration.

Source from the content-addressed store, hash-verified

269
270
271class PhysicalDevice(
272 collections.namedtuple("PhysicalDevice", ["name", "device_type"])):
273 """Abstraction for a locally visible physical device.
274
275 TensorFlow can utilize various devices such as the CPU or multiple GPUs
276 for computation. Before initializing a local device for use, the user can
277 customize certain properties of the device such as it's visibility or memory
278 configuration.
279
280 Once a PhysicalDevice is initialized one or many LogicalDevice objects are
281 created. Use tf.config.set_virtual_device_configuration() to create multiple
282 LogicalDevice objects for a PhysicalDevice. This is useful when separation
283 between models is needed.
284
285 Fields:
286 name: Unique identifier for device.
287 device_type: String declaring the type of device such as "CPU" or "GPU".
288 """
289 pass
290
291
292class _AtomicCounter(object):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected