diff options
Diffstat (limited to 'tensorflow/core/grappler/optimizers/auto_parallel.cc')
-rw-r--r-- | tensorflow/core/grappler/optimizers/auto_parallel.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/optimizers/auto_parallel.cc b/tensorflow/core/grappler/optimizers/auto_parallel.cc index 42f2f1850f..d46b849ad4 100644 --- a/tensorflow/core/grappler/optimizers/auto_parallel.cc +++ b/tensorflow/core/grappler/optimizers/auto_parallel.cc @@ -168,6 +168,11 @@ Status AutoParallel::Initialize(const GrapplerItem& item) { for (const auto& variable : item.MainVariables()) { dont_replicate_nodes.insert(variable->name()); } + + for (const auto& init : item.init_ops) { + dont_replicate_nodes.insert(NodeName(init)); + } + // Don't replicate all input nodes, except the dequeue node. for (const auto& input_node : input_nodes) { if (input_node->name() != dequeue_node->name()) { |