|View source on GitHub|
Abstraction for a locally visible physical device.
Compat aliases for migration
See Migration guide for more details.
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.
Once a visible
tf.config.PhysicalDevice is initialized one or more
tf.config.LogicalDevice objects are created. Use
tf.config.set_visible_devices to configure the visibility of a physical
tf.config.set_logical_device_configuration to configure multiple
tf.config.LogicalDevice objects for a
tf.config.PhysicalDevice. This is
useful when separation between models is needed or to simulate a multi-device
name: Unique identifier for device.
device_type: String declaring the type of device such as "CPU" or "GPU".
@staticmethod __new__( _cls, name, device_type )
Create new instance of PhysicalDevice(name, device_type)