Add doc for extended._retrace_functions_for_each_device.

PiperOrigin-RevId: 313663754
Change-Id: Ie643c0e54adb3eed6a7d20ea3328f2d49fb8047c
This commit is contained in:
Rick Chao 2020-05-28 14:48:02 -07:00 committed by TensorFlower Gardener
parent a5393e9046
commit 789ebcf00b

View File

@ -619,6 +619,11 @@ class StrategyBase(object):
if not hasattr(extended, "_retrace_functions_for_each_device"):
# pylint: disable=protected-access
# `extended._retrace_functions_for_each_device` dictates
# 1) whether all the ops created inside function will have devices
# inherited from outer stack, and
# 2) whether the same function will be retraced when it is called on
# different devices.
try:
extended._retrace_functions_for_each_device = (
len(extended.worker_devices) > 1)