tf.config.LogicalDeviceConfiguration

Configuration class for a logical devices.

Used in the notebooks

Used in the guide Used in the tutorials

The class specifies the parameters to configure a tf.config.PhysicalDevice as it is initialized to a tf.config.LogicalDevice during runtime initialization. Not all fields are valid for all device types.

See tf.config.get_logical_device_configuration and tf.config.set_logical_device_configuration for usage examples.

memory_limit (optional) Maximum memory (in MB) to allocate on the virtual device. Currently only supported for GPUs.
experimental_priority (optional) Priority to assign to a virtual device. Lower values have higher priorities and 0 is the default. Within a physical GPU, the GPU scheduler will prioritize ops on virtual devices with higher priority. Currently only supported for Nvidia GPUs.
experimental_device_ordinal (optional) Ordinal number to order the virtual device. LogicalDevice with lower ordinal number will receive a lower device id. Physical device id and location in the list is used to break ties. Currently only supported for Nvidia GPUs.

memory_limit A namedtuple alias for field number 0
experimental_priority A namedtuple alias for field number 1
experimental_device_ordinal A namedtuple alias for field number 2