From 2bd43147d01872c0f6df999b2acdc31e0a7a08cf Mon Sep 17 00:00:00 2001 From: Hyeonjong Ryu Date: Wed, 18 Nov 2020 21:47:20 -0800 Subject: [PATCH] Internal changes on cleanup. PiperOrigin-RevId: 343220353 Change-Id: I48377aa890ebda1eb47aeecafb976fc83d715f68 --- tensorflow/lite/tools/BUILD | 8 +- tensorflow/lite/tools/benchmark/BUILD | 1 - tensorflow/lite/tools/benchmark/android/BUILD | 4 - .../experimental/firebase/android/BUILD | 4 - tensorflow/lite/tools/evaluation/stages/BUILD | 1 - .../tasks/coco_object_detection/BUILD | 1 - .../tasks/imagenet_image_classification/BUILD | 1 - .../evaluation/tasks/inference_diff/BUILD | 1 - tensorflow/lite/tools/optimize/BUILD | 87 +++++++------------ .../lite/tools/optimize/calibration/BUILD | 6 -- tensorflow/lite/tools/optimize/python/BUILD | 1 - tensorflow/lite/tools/signature/BUILD | 4 +- tensorflow/lite/tools/versioning/BUILD | 1 - 13 files changed, 38 insertions(+), 82 deletions(-) diff --git a/tensorflow/lite/tools/BUILD b/tensorflow/lite/tools/BUILD index aa852093794..e2146910d52 100644 --- a/tensorflow/lite/tools/BUILD +++ b/tensorflow/lite/tools/BUILD @@ -258,7 +258,7 @@ cc_library( srcs = ["command_line_flags.cc"], hdrs = ["command_line_flags.h"], copts = tflite_copts(), - deps = ["//tensorflow/lite/tools:logging"], + deps = [":logging"], ) cc_test( @@ -296,8 +296,8 @@ tf_cc_binary( srcs = ["list_flex_ops_main.cc"], visibility = ["//visibility:public"], deps = [ + ":command_line_flags", ":list_flex_ops", - "//tensorflow/lite/tools:command_line_flags", "@com_google_absl//absl/strings", ], ) @@ -307,8 +307,8 @@ cc_library( srcs = ["list_flex_ops_main.cc"], visibility = ["//visibility:public"], deps = [ + ":command_line_flags", ":list_flex_ops", - "//tensorflow/lite/tools:command_line_flags", "@com_google_absl//absl/strings", ], ) @@ -329,8 +329,8 @@ tf_cc_binary( srcs = ["list_flex_ops_main.cc"], visibility = ["//visibility:public"], deps = [ + ":command_line_flags", ":list_flex_ops_no_kernel", - "//tensorflow/lite/tools:command_line_flags", "@com_google_absl//absl/strings", ], ) diff --git a/tensorflow/lite/tools/benchmark/BUILD b/tensorflow/lite/tools/benchmark/BUILD index eb3f37aef58..430bcf32766 100644 --- a/tensorflow/lite/tools/benchmark/BUILD +++ b/tensorflow/lite/tools/benchmark/BUILD @@ -213,7 +213,6 @@ cc_library( ":benchmark_params", ":benchmark_utils", "//tensorflow/core/util:stats_calculator_portable", - "//tensorflow/lite:framework", "//tensorflow/lite/c:common", "//tensorflow/lite/profiling:memory_info", "//tensorflow/lite/profiling:time", diff --git a/tensorflow/lite/tools/benchmark/android/BUILD b/tensorflow/lite/tools/benchmark/android/BUILD index be9c379af50..09cf57e5baf 100644 --- a/tensorflow/lite/tools/benchmark/android/BUILD +++ b/tensorflow/lite/tools/benchmark/android/BUILD @@ -22,10 +22,6 @@ android_binary( # can't be built. We need to prevent the build system from trying to # use the target in that case. tags = ["manual"], - deps = [ - ":hexagon_libs", - ":tensorflowlite_benchmark_native", - ], ) tflite_jni_binary( diff --git a/tensorflow/lite/tools/benchmark/experimental/firebase/android/BUILD b/tensorflow/lite/tools/benchmark/experimental/firebase/android/BUILD index 98591063962..5b25cba0487 100644 --- a/tensorflow/lite/tools/benchmark/experimental/firebase/android/BUILD +++ b/tensorflow/lite/tools/benchmark/experimental/firebase/android/BUILD @@ -23,10 +23,6 @@ android_binary( # can't be built. We need to prevent the build system from trying to # use the target in that case. tags = ["manual"], - deps = [ - ":hexagon_libs", - ":tensorflowlite_benchmark_firebase_native", - ], ) tflite_jni_binary( diff --git a/tensorflow/lite/tools/evaluation/stages/BUILD b/tensorflow/lite/tools/evaluation/stages/BUILD index 4363aff01a9..1e621956ea8 100644 --- a/tensorflow/lite/tools/evaluation/stages/BUILD +++ b/tensorflow/lite/tools/evaluation/stages/BUILD @@ -180,7 +180,6 @@ cc_test( deps = [ ":inference_profiler_stage", "//tensorflow/lite/c:common", - "//tensorflow/lite/delegates/nnapi:nnapi_delegate", "//tensorflow/lite/tools/evaluation/proto:evaluation_config_cc_proto", "//tensorflow/lite/tools/evaluation/proto:evaluation_stages_cc_proto", "@com_google_googletest//:gtest_main", diff --git a/tensorflow/lite/tools/evaluation/tasks/coco_object_detection/BUILD b/tensorflow/lite/tools/evaluation/tasks/coco_object_detection/BUILD index cfb49a20a78..34a2f9ce68c 100644 --- a/tensorflow/lite/tools/evaluation/tasks/coco_object_detection/BUILD +++ b/tensorflow/lite/tools/evaluation/tasks/coco_object_detection/BUILD @@ -29,7 +29,6 @@ cc_library( "//tensorflow/lite/c:common", "//tensorflow/lite/tools:command_line_flags", "//tensorflow/lite/tools:logging", - "//tensorflow/lite/tools/evaluation:evaluation_stage", "//tensorflow/lite/tools/evaluation:utils", "//tensorflow/lite/tools/evaluation/proto:evaluation_config_cc_proto", "//tensorflow/lite/tools/evaluation/proto:evaluation_stages_cc_proto", diff --git a/tensorflow/lite/tools/evaluation/tasks/imagenet_image_classification/BUILD b/tensorflow/lite/tools/evaluation/tasks/imagenet_image_classification/BUILD index 941bbc0ff69..c315e5ca4a6 100644 --- a/tensorflow/lite/tools/evaluation/tasks/imagenet_image_classification/BUILD +++ b/tensorflow/lite/tools/evaluation/tasks/imagenet_image_classification/BUILD @@ -17,7 +17,6 @@ cc_library( "//tensorflow/lite/c:common", "//tensorflow/lite/tools:command_line_flags", "//tensorflow/lite/tools:logging", - "//tensorflow/lite/tools/evaluation:evaluation_stage", "//tensorflow/lite/tools/evaluation:utils", "//tensorflow/lite/tools/evaluation/proto:evaluation_config_cc_proto", "//tensorflow/lite/tools/evaluation/proto:evaluation_stages_cc_proto", diff --git a/tensorflow/lite/tools/evaluation/tasks/inference_diff/BUILD b/tensorflow/lite/tools/evaluation/tasks/inference_diff/BUILD index 36606722caf..8befc356d41 100644 --- a/tensorflow/lite/tools/evaluation/tasks/inference_diff/BUILD +++ b/tensorflow/lite/tools/evaluation/tasks/inference_diff/BUILD @@ -17,7 +17,6 @@ cc_library( "//tensorflow/lite/c:common", "//tensorflow/lite/tools:command_line_flags", "//tensorflow/lite/tools:logging", - "//tensorflow/lite/tools/evaluation:evaluation_stage", "//tensorflow/lite/tools/evaluation/proto:evaluation_config_cc_proto", "//tensorflow/lite/tools/evaluation/proto:evaluation_stages_cc_proto", "//tensorflow/lite/tools/evaluation/stages:inference_profiler_stage", diff --git a/tensorflow/lite/tools/optimize/BUILD b/tensorflow/lite/tools/optimize/BUILD index c77c08eeb6b..715afa642a3 100644 --- a/tensorflow/lite/tools/optimize/BUILD +++ b/tensorflow/lite/tools/optimize/BUILD @@ -43,17 +43,13 @@ tf_cc_test( "//tensorflow/lite/schema:schema_utils", "@com_google_absl//absl/memory", "@com_google_googletest//:gtest", - "@flatbuffers", ], ) cc_binary( name = "modify_model_interface_main", srcs = ["modify_model_interface_main.cc"], - deps = [ - ":modify_model_interface", - ":quantize_model", - ], + deps = [":modify_model_interface"], ) cc_library( @@ -65,7 +61,6 @@ cc_library( "//tensorflow/lite:framework", "//tensorflow/lite/core/api", "//tensorflow/lite/schema:schema_fbs", - "@flatbuffers", ], ) @@ -82,9 +77,7 @@ tf_cc_test( "//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_utils", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", - "@flatbuffers", ], ) @@ -109,9 +102,7 @@ tf_cc_test( "//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_utils", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", - "@flatbuffers", ], ) @@ -121,11 +112,7 @@ cc_library( hdrs = ["quantization_wrapper.h"], deps = [ ":quantization_wrapper_utils", - "//tensorflow/lite:framework", - "//tensorflow/lite/core/api", - "//tensorflow/lite/schema:schema_fbs", - "//tensorflow/lite/tools/optimize:quantize_model", - "@flatbuffers", + ":quantize_model", ], ) @@ -147,7 +134,6 @@ cc_library( "//tensorflow/lite/schema:schema_fbs", "//third_party/eigen3", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", ], ) @@ -165,7 +151,6 @@ cc_library( "//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_utils", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", ], ) @@ -184,7 +169,6 @@ tf_cc_test( "//tensorflow/lite:framework", "//tensorflow/lite/schema:schema_fbs", "@com_google_googletest//:gtest", - "@flatbuffers", ], ) @@ -195,7 +179,6 @@ cc_library( compatible_with = get_compatible_with_cloud(), deps = [ "//tensorflow/lite:framework", - "//tensorflow/lite/kernels/internal:types", "//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_utils", ], @@ -223,11 +206,8 @@ tf_cc_test( "//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_utils", "//tensorflow/lite/testing:util", - "//third_party/eigen3", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", - "@flatbuffers", ], ) @@ -240,7 +220,6 @@ cc_library( ":quantization_utils", ":model_utils", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", "@com_google_absl//absl/container:flat_hash_map", "@flatbuffers", "//tensorflow/lite:framework", @@ -259,10 +238,10 @@ tf_cc_test( "--test_model_file=$(location //tensorflow/lite/tools/optimize:testdata/single_conv_weights_min_0_max_plus_10.bin)", ], data = [ - "//tensorflow/lite/tools/optimize:testdata/custom_op.bin", - "//tensorflow/lite/tools/optimize:testdata/quantized_with_gather.bin", - "//tensorflow/lite/tools/optimize:testdata/single_conv_weights_min_0_max_plus_10.bin", - "//tensorflow/lite/tools/optimize:testdata/weight_shared_between_convs.bin", + ":testdata/custom_op.bin", + ":testdata/quantized_with_gather.bin", + ":testdata/single_conv_weights_min_0_max_plus_10.bin", + ":testdata/weight_shared_between_convs.bin", ], tags = [ "tflite_not_portable_android", @@ -287,10 +266,8 @@ cc_library( srcs = ["test_util.cc"], hdrs = ["test_util.h"], deps = [ - "//tensorflow/lite:framework", "//tensorflow/lite/core/api", "@com_google_googletest//:gtest", - "@flatbuffers", ], ) @@ -318,32 +295,32 @@ tf_cc_test( "--test_model_file=$(location //tensorflow/lite/tools/optimize:testdata/single_conv_weights_min_0_max_plus_10.bin)", ], data = [ - "//tensorflow/lite/tools/optimize:testdata/add_with_const_input.bin", - "//tensorflow/lite/tools/optimize:testdata/argmax.bin", - "//tensorflow/lite/tools/optimize:testdata/concat.bin", - "//tensorflow/lite/tools/optimize:testdata/fc.bin", - "//tensorflow/lite/tools/optimize:testdata/lstm_calibrated.bin", - "//tensorflow/lite/tools/optimize:testdata/lstm_calibrated2.bin", - "//tensorflow/lite/tools/optimize:testdata/lstm_quantized.bin", - "//tensorflow/lite/tools/optimize:testdata/lstm_quantized2.bin", - "//tensorflow/lite/tools/optimize:testdata/maximum.bin", - "//tensorflow/lite/tools/optimize:testdata/minimum.bin", - "//tensorflow/lite/tools/optimize:testdata/mixed.bin", - "//tensorflow/lite/tools/optimize:testdata/mixed16x8.bin", - "//tensorflow/lite/tools/optimize:testdata/multi_input_add_reshape.bin", - "//tensorflow/lite/tools/optimize:testdata/pack.bin", - "//tensorflow/lite/tools/optimize:testdata/single_avg_pool_min_minus_5_max_plus_5.bin", - "//tensorflow/lite/tools/optimize:testdata/single_conv_no_bias.bin", - "//tensorflow/lite/tools/optimize:testdata/single_conv_weights_min_0_max_plus_10.bin", - "//tensorflow/lite/tools/optimize:testdata/single_conv_weights_min_minus_127_max_plus_127.bin", - "//tensorflow/lite/tools/optimize:testdata/single_softmax_min_minus_5_max_plus_5.bin", - "//tensorflow/lite/tools/optimize:testdata/split.bin", - "//tensorflow/lite/tools/optimize:testdata/svdf_calibrated.bin", - "//tensorflow/lite/tools/optimize:testdata/svdf_quantized.bin", - "//tensorflow/lite/tools/optimize:testdata/transpose.bin", - "//tensorflow/lite/tools/optimize:testdata/unidirectional_sequence_lstm_calibrated.bin", - "//tensorflow/lite/tools/optimize:testdata/unidirectional_sequence_lstm_quantized.bin", - "//tensorflow/lite/tools/optimize:testdata/unpack.bin", + ":testdata/add_with_const_input.bin", + ":testdata/argmax.bin", + ":testdata/concat.bin", + ":testdata/fc.bin", + ":testdata/lstm_calibrated.bin", + ":testdata/lstm_calibrated2.bin", + ":testdata/lstm_quantized.bin", + ":testdata/lstm_quantized2.bin", + ":testdata/maximum.bin", + ":testdata/minimum.bin", + ":testdata/mixed.bin", + ":testdata/mixed16x8.bin", + ":testdata/multi_input_add_reshape.bin", + ":testdata/pack.bin", + ":testdata/single_avg_pool_min_minus_5_max_plus_5.bin", + ":testdata/single_conv_no_bias.bin", + ":testdata/single_conv_weights_min_0_max_plus_10.bin", + ":testdata/single_conv_weights_min_minus_127_max_plus_127.bin", + ":testdata/single_softmax_min_minus_5_max_plus_5.bin", + ":testdata/split.bin", + ":testdata/svdf_calibrated.bin", + ":testdata/svdf_quantized.bin", + ":testdata/transpose.bin", + ":testdata/unidirectional_sequence_lstm_calibrated.bin", + ":testdata/unidirectional_sequence_lstm_quantized.bin", + ":testdata/unpack.bin", ], tags = [ "tflite_not_portable_android", diff --git a/tensorflow/lite/tools/optimize/calibration/BUILD b/tensorflow/lite/tools/optimize/calibration/BUILD index bf4a9b86233..64f15857bdb 100644 --- a/tensorflow/lite/tools/optimize/calibration/BUILD +++ b/tensorflow/lite/tools/optimize/calibration/BUILD @@ -70,9 +70,7 @@ cc_library( "//tensorflow/lite/kernels:kernel_util", "//tensorflow/lite/schema:schema_fbs", "//tensorflow/lite/schema:schema_utils", - "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", "@flatbuffers", ], ) @@ -101,7 +99,6 @@ tf_cc_test( "//tensorflow/lite/kernels:builtin_ops", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", ], ) @@ -128,7 +125,6 @@ cc_test( deps = [ ":logging_op_resolver", "//tensorflow/lite:framework", - "//tensorflow/lite/kernels:builtin_ops", "@com_google_googletest//:gtest", ], ) @@ -143,7 +139,6 @@ cc_library( "//tensorflow/lite:framework", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", ], ) @@ -153,7 +148,6 @@ cc_library( hdrs = ["calibration_logger.h"], copts = tflite_copts(), deps = [ - "//tensorflow/lite:framework", "//tensorflow/lite:minimal_logging", "//tensorflow/lite/c:common", "//tensorflow/lite/core/api", diff --git a/tensorflow/lite/tools/optimize/python/BUILD b/tensorflow/lite/tools/optimize/python/BUILD index 34f57cbecaf..b25f3c710fe 100644 --- a/tensorflow/lite/tools/optimize/python/BUILD +++ b/tensorflow/lite/tools/optimize/python/BUILD @@ -26,7 +26,6 @@ py_library( deps = [ ":_pywrap_modify_model_interface", ":modify_model_interface_constants", - "//tensorflow:tensorflow_py", "//tensorflow/lite/python:schema_py", ], ) diff --git a/tensorflow/lite/tools/signature/BUILD b/tensorflow/lite/tools/signature/BUILD index 05fc106d759..7fd83562258 100644 --- a/tensorflow/lite/tools/signature/BUILD +++ b/tensorflow/lite/tools/signature/BUILD @@ -81,7 +81,7 @@ py_library( srcs_version = "PY2AND3", deps = [ ":_pywrap_signature_def_util_wrapper", - "//tensorflow/core:protos_all_py", + "//tensorflow/core/protobuf:meta_graph_pyclif_pb2", ], ) @@ -98,7 +98,7 @@ py_test( deps = [ ":signature_def_utils", "//tensorflow:tensorflow_py", - "//tensorflow/core:protos_all_py", + "//tensorflow/core/protobuf:meta_graph_pyclif_pb2", ], ) diff --git a/tensorflow/lite/tools/versioning/BUILD b/tensorflow/lite/tools/versioning/BUILD index 06ac1968f52..31fb903ce8d 100644 --- a/tensorflow/lite/tools/versioning/BUILD +++ b/tensorflow/lite/tools/versioning/BUILD @@ -43,7 +43,6 @@ tf_cc_test( ":versioning", "//tensorflow/lite/kernels:builtin_ops", "//tensorflow/lite/schema:schema_fbs", - "//tensorflow/lite/schema:schema_fbs_with_mutable", "@com_google_googletest//:gtest_main", ], )