|TensorFlow 1 version||View source on GitHub|
Turns logging for device placement decisions on or off.
Compat aliases for migration
See Migration guide for more details.
tf.debugging.set_log_device_placement( enabled )
Used in the notebooks
|Used in the guide|
Operations execute on a particular device, producing and consuming tensors on that device. This may change the performance of the operation or require TensorFlow to copy data to or from an accelerator, so knowing where operations execute is useful for debugging performance issues.
For more advanced profiling, use the TensorFlow profiler.
Device placement for operations is typically controlled by a
scope, but there are exceptions, for example operations on a
which follow the initial placement of the variable. Turning off soft device
tf.config.set_soft_device_placement) provides more explicit
# [...] op Fill in device /job:localhost/replica:0/task:0/device:GPU:0
# [...] op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
||Whether to enabled device placement logging.|