aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-03-17 08:54:03 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-17 10:17:05 -0700
commit5a95c76c8e0c8eb6e84707c484341cac14e989c9 (patch)
treeab892e4b1e18b79333ce9e74d7f5f67012e42035
parent8e138e7273f7a45bfdd020020b030d928c7297bf (diff)
Set producer version in the graph used by shape refiner to run constant
folding. Change: 150450219
-rw-r--r--tensorflow/core/common_runtime/shape_refiner.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/common_runtime/shape_refiner.cc b/tensorflow/core/common_runtime/shape_refiner.cc
index 7288ecb143..2f65abde0a 100644
--- a/tensorflow/core/common_runtime/shape_refiner.cc
+++ b/tensorflow/core/common_runtime/shape_refiner.cc
@@ -203,6 +203,9 @@ Status ShapeRefiner::EvaluateConstantTensorForEdge(const Node* node,
bool is_constant_graph = false;
Graph subgraph(ops_registry_);
+ auto versions = subgraph.versions();
+ versions.set_producer(graph_def_version_);
+ subgraph.set_versions(versions);
// We identify the possibly constant subgraph to evaluate by
// recursively iterating backwards through the inputs to 'node'