diff --git a/tflite/toco/BUILD b/tflite/toco/BUILD index b23248e86a..7da3006e70 100644 --- a/tflite/toco/BUILD +++ b/tflite/toco/BUILD @@ -150,9 +150,11 @@ cc_library( ":toco_graphviz_dump_options", ":toco_port", ":types_proto_cc", + "//base:raw_logging", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@org_tensorflow//tensorflow/core:framework_internal", "@org_tensorflow//tensorflow/core:lib", ], @@ -356,6 +358,7 @@ cc_library( "@org_tensorflow//tensorflow/core:framework", "@org_tensorflow//tensorflow/core:lib", "@org_tensorflow//tensorflow/core:protos_all_cc", + "@org_tensorflow//third_party/protobuf:protobuf_lite", ], ) @@ -363,9 +366,12 @@ tf_cc_test( name = "import_tensorflow_test", srcs = ["import_tensorflow_test.cc"], deps = [ + ":model_flags_proto_cc", ":toco_port", ":toco_tooling", "//tflite/testing:util", + "@com_google_absl//absl/log:check", + "@com_google_absl//absl/status", "@com_google_googletest//:gtest", "@org_tensorflow//tensorflow/core:framework", "@org_tensorflow//tensorflow/core:graph", diff --git a/tflite/toco/allocate_transient_arrays.cc b/tflite/toco/allocate_transient_arrays.cc index b7402972fa..4516423989 100644 --- a/tflite/toco/allocate_transient_arrays.cc +++ b/tflite/toco/allocate_transient_arrays.cc @@ -12,7 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +#include "tflite/toco/allocate_transient_arrays.h" + #include +#include +#include #include #include #include @@ -20,11 +24,12 @@ limitations under the License. #include #include -#include "tflite/toco/allocate_transient_arrays.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "tensorflow/core/platform/logging.h" #include "tflite/toco/model.h" #include "tflite/toco/model_flags.pb.h" #include "tflite/toco/tooling_util.h" -#include "tensorflow/core/platform/logging.h" namespace toco { namespace { diff --git a/tflite/toco/args.cc b/tflite/toco/args.cc index b3f7d9f23e..df95ed050a 100644 --- a/tflite/toco/args.cc +++ b/tflite/toco/args.cc @@ -15,9 +15,18 @@ limitations under the License. #include "tflite/toco/args.h" +#include +#include #include +#include +#include +#include "base/raw_logging.h" +#include "absl/strings/ascii.h" +#include "absl/strings/numbers.h" #include "absl/strings/str_split.h" +#include "absl/strings/string_view.h" +#include "absl/strings/strip.h" namespace toco { namespace { diff --git a/tflite/toco/dump_graphviz.cc b/tflite/toco/dump_graphviz.cc index c8cf56bc9a..bcb86773d5 100644 --- a/tflite/toco/dump_graphviz.cc +++ b/tflite/toco/dump_graphviz.cc @@ -17,12 +17,11 @@ limitations under the License. #include #include #include +#include #include #include #include -#include "absl/memory/memory.h" -#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/strings/strip.h" #include "re2/re2.h" diff --git a/tflite/toco/export_tensorflow.cc b/tflite/toco/export_tensorflow.cc index 3af0c6384c..f18c0f6ba2 100644 --- a/tflite/toco/export_tensorflow.cc +++ b/tflite/toco/export_tensorflow.cc @@ -13,15 +13,15 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include +#include +#include #include #include -#include #include #include -#include "google/protobuf/map.h" -#include "google/protobuf/text_format.h" -#include "absl/memory/memory.h" +#include "absl/log/check.h" +#include "absl/log/log.h" #include "absl/strings/string_view.h" #include "tensorflow/core/framework/attr_value.pb.h" #include "tensorflow/core/framework/graph.pb.h" diff --git a/tflite/toco/import_tensorflow.cc b/tflite/toco/import_tensorflow.cc index 0efc64bac4..ee56ef5d13 100644 --- a/tflite/toco/import_tensorflow.cc +++ b/tflite/toco/import_tensorflow.cc @@ -14,19 +14,26 @@ limitations under the License. ==============================================================================*/ #include "tflite/toco/import_tensorflow.h" +#include +#include +#include +#include #include #include +#include #include #include -#include "google/protobuf/map.h" -#include "google/protobuf/text_format.h" -#include "absl/memory/memory.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" #include "absl/strings/match.h" #include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" +#include "absl/strings/string_view.h" #include "absl/strings/strip.h" +#include "third_party/protobuf/repeated_ptr_field.h" #include "tensorflow/core/common_runtime/device_factory.h" #include "tensorflow/core/common_runtime/function.h" #include "tensorflow/core/common_runtime/graph_constructor.h" diff --git a/tflite/toco/import_tensorflow_test.cc b/tflite/toco/import_tensorflow_test.cc index 023e98b3db..9d7ba86bac 100644 --- a/tflite/toco/import_tensorflow_test.cc +++ b/tflite/toco/import_tensorflow_test.cc @@ -14,19 +14,30 @@ limitations under the License. ==============================================================================*/ #include "tflite/toco/import_tensorflow.h" +#include +#include +#include +#include #include #include +#include +#include +#include #include #include +#include "absl/log/check.h" +#include "absl/status/status.h" #include "tensorflow/core/framework/attr_value.pb.h" #include "tensorflow/core/framework/attr_value_util.h" #include "tensorflow/core/framework/node_def.pb.h" #include "tensorflow/core/framework/node_def_builder.h" #include "tensorflow/core/framework/tensor.pb.h" #include "tensorflow/core/framework/tensor_shape.pb.h" +#include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/lib/core/status.h" #include "tflite/testing/util.h" +#include "tflite/toco/model_flags.pb.h" #include "tflite/toco/toco_port.h" namespace toco {