Spec-Zone.ru › TensorFlow

tf.config.LogicalDeviceConfiguration

Configuration class for a logical devices.

View aliases

Main aliases

tf.config.experimental.VirtualDeviceConfiguration

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.config.LogicalDeviceConfiguration, tf.compat.v1.config.experimental.VirtualDeviceConfiguration

tf.config.LogicalDeviceConfiguration(
    memory_limit=None,
    experimental_priority=None,
    experimental_device_ordinal=None
)

Used in the notebooks

Used in the guide Used in the tutorials
  • Use a GPU
  • Random number generation
  • Distributed training with Core APIs and DTensor
  • DTensor concepts
  • Using DTensors with Keras
  • Distributed training with DTensors
  • Distributed Input
  • TFF simulations with accelerators
  • TFP Release Notes notebook (0.12.1)

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.

Fields
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.
Attributes
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

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/config/LogicalDeviceConfiguration

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API