aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc
diff options
context:
space:
mode:
authorGravatar Yu-Cheng Ling <ycling@google.com>2018-10-09 11:38:15 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-09 11:48:46 -0700
commit12e164d1e7c0b197f06d5d3c2ed26318b89b5e4c (patch)
treed2f0b6ba463baff8e3607575f41d3655762f3d14 /tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc
parent931353c5f79c2d419afb3a5ecac59184c5558351 (diff)
Return ::tensorflow::Status in Toco Graph Transformations.
PiperOrigin-RevId: 216392908
Diffstat (limited to 'tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc')
-rw-r--r--tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc b/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc
index 7ec7752f25..37fe5fa3d7 100644
--- a/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc
+++ b/tensorflow/contrib/lite/toco/graph_transformations/remove_tensorflow_identity.cc
@@ -25,14 +25,18 @@ limitations under the License.
namespace toco {
-bool RemoveTensorFlowIdentity::Run(Model* model, std::size_t op_index) {
+::tensorflow::Status RemoveTensorFlowIdentity::Run(Model* model,
+ std::size_t op_index,
+ bool* modified) {
+ *modified = false;
const auto passthru_it = model->operators.begin() + op_index;
const auto* passthru_op = passthru_it->get();
if (passthru_op->type != OperatorType::kIdentity) {
- return false;
+ return ::tensorflow::Status::OK();
}
- return RemoveTrivialPassthroughOp(this, model, op_index);
+ *modified = RemoveTrivialPassthroughOp(this, model, op_index);
+ return ::tensorflow::Status::OK();
}
} // namespace toco