aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/toco/tooling_util.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-02-27 15:19:47 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-27 15:23:57 -0800
commit2c25f08b6f97155bd5ce95aada5a3cc9b916176f (patch)
tree115fe5a596c07d49c9199fc47c28be5f75d3ad26 /tensorflow/contrib/lite/toco/tooling_util.h
parente101ce9c1c8399fecd6679293d8cb2065ce8d47f (diff)
Implement support for unpartitioning tf.nn.embedding_lookup into a single gather.
PiperOrigin-RevId: 187241089
Diffstat (limited to 'tensorflow/contrib/lite/toco/tooling_util.h')
-rw-r--r--tensorflow/contrib/lite/toco/tooling_util.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/toco/tooling_util.h b/tensorflow/contrib/lite/toco/tooling_util.h
index 11208ed667..01917b29de 100644
--- a/tensorflow/contrib/lite/toco/tooling_util.h
+++ b/tensorflow/contrib/lite/toco/tooling_util.h
@@ -64,6 +64,10 @@ int CountOpsWithInput(const Model& model, const string& array_name);
bool DeleteArrayIfUnused(const string& array_name, Model* model);
bool DeleteArrayIfUsedOnce(const string& array_name, Model* model);
+// Deletes the op and any of its input and output arrays if they are unused
+// after the op has been deleted.
+void DeleteOpAndArraysIfUnused(Model* model, Operator* op);
+
std::vector<std::unique_ptr<Operator>>::const_iterator FindOpWithOutput(
const Model& model, const string& array_name);
Operator* GetOpWithOutput(const Model& model, const string& array_name);
@@ -71,8 +75,6 @@ Operator* GetOpWithOutput(const Model& model, const string& array_name);
std::vector<std::unique_ptr<Operator>>::iterator FindOpWithOutput(
Model& model, const string& array_name);
-Operator* GetOpWithOutput(const Model& model, const string& array_name);
-
std::vector<std::unique_ptr<Operator>>::const_iterator FindOpWithInput(
const Model& model, const string& array_name);