From 649ac9824678b3233c2ef568f6a6102fe54050e5 Mon Sep 17 00:00:00 2001 From: Skye Wanderman-Milne Date: Wed, 29 Mar 2017 22:09:23 -0800 Subject: [PATCH] Move equal_graph_def.h/cc from core/graph to core/util This fixes build dependencies for a future patch (specifically allows referencing equal_graph_def.h from core/framework) Change: 151668115 --- tensorflow/cc/BUILD | 4 ++-- tensorflow/cc/framework/gradient_checker_test.cc | 2 +- tensorflow/cc/framework/gradients_test.cc | 2 +- tensorflow/compiler/jit/BUILD | 2 +- tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc | 2 +- tensorflow/compiler/jit/graph_to_functiondef_test.cc | 2 +- tensorflow/core/BUILD | 3 ++- tensorflow/core/framework/graph_def_util_test.cc | 2 +- tensorflow/core/graph/graph_partition_test.cc | 2 +- tensorflow/core/{graph => util}/equal_graph_def.cc | 2 +- tensorflow/core/{graph => util}/equal_graph_def.h | 0 tensorflow/core/{graph => util}/equal_graph_def_test.cc | 2 +- tensorflow/python/client/tf_session_helper.cc | 2 +- tensorflow/tools/graph_transforms/BUILD | 2 +- tensorflow/tools/graph_transforms/compare_graphs.cc | 2 +- tensorflow/tools/graph_transforms/transform_utils_test.cc | 2 +- 16 files changed, 17 insertions(+), 16 deletions(-) rename tensorflow/core/{graph => util}/equal_graph_def.cc (99%) rename tensorflow/core/{graph => util}/equal_graph_def.h (100%) rename tensorflow/core/{graph => util}/equal_graph_def_test.cc (99%) diff --git a/tensorflow/cc/BUILD b/tensorflow/cc/BUILD index 9d1870af0af..aaebdded9a5 100644 --- a/tensorflow/cc/BUILD +++ b/tensorflow/cc/BUILD @@ -42,8 +42,8 @@ tf_cc_test( ":gradients", ":testutil", "//tensorflow/core:all_kernels", - "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", + "//tensorflow/core:framework_internal", "//tensorflow/core:test", "//tensorflow/core:test_main", "//tensorflow/core:testlib", @@ -78,8 +78,8 @@ tf_cc_test( ":gradient_checker", ":testutil", "//tensorflow/core:all_kernels", - "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", + "//tensorflow/core:framework_internal", "//tensorflow/core:test", "//tensorflow/core:test_main", "//tensorflow/core:testlib", diff --git a/tensorflow/cc/framework/gradient_checker_test.cc b/tensorflow/cc/framework/gradient_checker_test.cc index 998e9fe07dc..c5bddc50fcc 100644 --- a/tensorflow/cc/framework/gradient_checker_test.cc +++ b/tensorflow/cc/framework/gradient_checker_test.cc @@ -19,9 +19,9 @@ limitations under the License. #include "tensorflow/cc/ops/standard_ops.h" #include "tensorflow/core/framework/node_def_util.h" #include "tensorflow/core/framework/tensor_testutil.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/test.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { using namespace ops; // NOLINT(build/namespaces) diff --git a/tensorflow/cc/framework/gradients_test.cc b/tensorflow/cc/framework/gradients_test.cc index 8c6e5de4259..6c2c2fcd1e2 100644 --- a/tensorflow/cc/framework/gradients_test.cc +++ b/tensorflow/cc/framework/gradients_test.cc @@ -19,9 +19,9 @@ limitations under the License. #include "tensorflow/cc/ops/standard_ops.h" #include "tensorflow/core/framework/node_def_util.h" #include "tensorflow/core/framework/tensor_testutil.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/test.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { using namespace ops; // NOLINT(build/namespaces) diff --git a/tensorflow/compiler/jit/BUILD b/tensorflow/compiler/jit/BUILD index 2013c5e7f06..c16fe56122f 100644 --- a/tensorflow/compiler/jit/BUILD +++ b/tensorflow/compiler/jit/BUILD @@ -229,8 +229,8 @@ cc_test( "//tensorflow/compiler/tf2xla:xla_compiler", "//tensorflow/compiler/tf2xla/kernels:xla_ops", "//tensorflow/core:core_cpu", - "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", + "//tensorflow/core:framework_internal", "//tensorflow/core:test", "//tensorflow/core:test_main", "//tensorflow/core:testlib", diff --git a/tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc b/tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc index 86c19030547..faab7bd3d25 100644 --- a/tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc +++ b/tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc @@ -18,11 +18,11 @@ limitations under the License. #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/ops/standard_ops.h" #include "tensorflow/core/framework/function_testlib.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/graph/graph_constructor.h" #include "tensorflow/core/graph/graph_def_builder.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/test.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { namespace { diff --git a/tensorflow/compiler/jit/graph_to_functiondef_test.cc b/tensorflow/compiler/jit/graph_to_functiondef_test.cc index 63d91ceab88..5c09e96a4c2 100644 --- a/tensorflow/compiler/jit/graph_to_functiondef_test.cc +++ b/tensorflow/compiler/jit/graph_to_functiondef_test.cc @@ -19,11 +19,11 @@ limitations under the License. #include "tensorflow/cc/ops/function_ops.h" #include "tensorflow/cc/ops/standard_ops.h" #include "tensorflow/core/framework/function_testlib.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/graph/graph_constructor.h" #include "tensorflow/core/graph/graph_def_builder.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/test.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { namespace { diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 62f30b813b2..ad660e0100d 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -1381,6 +1381,7 @@ tf_cuda_library( "framework/unique_tensor_references.h", "util/command_line_flags.h", "util/env_var.h", + "util/equal_graph_def.h", "util/presized_cuckoo_map.h", "util/tensor_slice_set.h", "util/tensor_slice_util.h", @@ -1952,7 +1953,6 @@ tf_cc_tests( "framework/unique_tensor_references_test.cc", "graph/algorithm_test.cc", "graph/edgeset_test.cc", - "graph/equal_graph_def_test.cc", "graph/graph_def_builder_test.cc", "graph/graph_partition_test.cc", "graph/graph_test.cc", @@ -1964,6 +1964,7 @@ tf_cc_tests( "util/bcast_test.cc", "util/command_line_flags_test.cc", "util/device_name_utils_test.cc", + "util/equal_graph_def_test.cc", "util/events_writer_test.cc", "util/example_proto_fast_parsing_test.cc", "util/example_proto_helper_test.cc", diff --git a/tensorflow/core/framework/graph_def_util_test.cc b/tensorflow/core/framework/graph_def_util_test.cc index 1b12323e9a6..8c76a74a4a5 100644 --- a/tensorflow/core/framework/graph_def_util_test.cc +++ b/tensorflow/core/framework/graph_def_util_test.cc @@ -21,9 +21,9 @@ limitations under the License. #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_def.pb.h" #include "tensorflow/core/framework/op_def_builder.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/test.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { namespace { diff --git a/tensorflow/core/graph/graph_partition_test.cc b/tensorflow/core/graph/graph_partition_test.cc index 02d368ddb5f..aa732f1fc98 100644 --- a/tensorflow/core/graph/graph_partition_test.cc +++ b/tensorflow/core/graph/graph_partition_test.cc @@ -24,7 +24,6 @@ limitations under the License. #include "tensorflow/cc/ops/random_ops.h" #include "tensorflow/cc/ops/sendrecv_ops.h" #include "tensorflow/core/framework/op.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/graph/graph.h" #include "tensorflow/core/graph/graph_constructor.h" #include "tensorflow/core/graph/graph_def_builder.h" @@ -34,6 +33,7 @@ limitations under the License. #include "tensorflow/core/platform/protobuf.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/public/version.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { namespace { diff --git a/tensorflow/core/graph/equal_graph_def.cc b/tensorflow/core/util/equal_graph_def.cc similarity index 99% rename from tensorflow/core/graph/equal_graph_def.cc rename to tensorflow/core/util/equal_graph_def.cc index 21b6d55ca85..7e7a3f52236 100644 --- a/tensorflow/core/graph/equal_graph_def.cc +++ b/tensorflow/core/util/equal_graph_def.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tensorflow/core/graph/equal_graph_def.h" +#include "tensorflow/core/util/equal_graph_def.h" #include #include diff --git a/tensorflow/core/graph/equal_graph_def.h b/tensorflow/core/util/equal_graph_def.h similarity index 100% rename from tensorflow/core/graph/equal_graph_def.h rename to tensorflow/core/util/equal_graph_def.h diff --git a/tensorflow/core/graph/equal_graph_def_test.cc b/tensorflow/core/util/equal_graph_def_test.cc similarity index 99% rename from tensorflow/core/graph/equal_graph_def_test.cc rename to tensorflow/core/util/equal_graph_def_test.cc index b10446cf8ba..9ce951e6eff 100644 --- a/tensorflow/core/graph/equal_graph_def_test.cc +++ b/tensorflow/core/util/equal_graph_def_test.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tensorflow/core/graph/equal_graph_def.h" +#include "tensorflow/core/util/equal_graph_def.h" #include "tensorflow/core/framework/node_def_util.h" #include "tensorflow/core/framework/op.h" diff --git a/tensorflow/python/client/tf_session_helper.cc b/tensorflow/python/client/tf_session_helper.cc index 9f138b52779..99c154bd997 100644 --- a/tensorflow/python/client/tf_session_helper.cc +++ b/tensorflow/python/client/tf_session_helper.cc @@ -21,9 +21,9 @@ limitations under the License. #include "tensorflow/core/framework/allocator.h" #include "tensorflow/core/framework/log_memory.h" #include "tensorflow/core/framework/op_kernel.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/lib/core/coding.h" #include "tensorflow/core/platform/types.h" +#include "tensorflow/core/util/equal_graph_def.h" #include "tensorflow/python/lib/core/ndarray_tensor_bridge.h" namespace tensorflow { diff --git a/tensorflow/tools/graph_transforms/BUILD b/tensorflow/tools/graph_transforms/BUILD index ee6d013cc0c..89068c6d016 100644 --- a/tensorflow/tools/graph_transforms/BUILD +++ b/tensorflow/tools/graph_transforms/BUILD @@ -45,8 +45,8 @@ tf_cc_test( ":transform_utils", "//tensorflow/cc:cc_ops", "//tensorflow/core:core_cpu", - "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", + "//tensorflow/core:framework_internal", "//tensorflow/core:lib", "//tensorflow/core:protos_all_cc", "//tensorflow/core:test", diff --git a/tensorflow/tools/graph_transforms/compare_graphs.cc b/tensorflow/tools/graph_transforms/compare_graphs.cc index 67198da5e92..8fce16337f7 100644 --- a/tensorflow/tools/graph_transforms/compare_graphs.cc +++ b/tensorflow/tools/graph_transforms/compare_graphs.cc @@ -24,11 +24,11 @@ limitations under the License. // The return value is 0 if the graphs are equal, 1 if they're different, and -1 // if there was a problem. -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/init_main.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/util/command_line_flags.h" +#include "tensorflow/core/util/equal_graph_def.h" #include "tensorflow/tools/graph_transforms/transform_utils.h" namespace tensorflow { diff --git a/tensorflow/tools/graph_transforms/transform_utils_test.cc b/tensorflow/tools/graph_transforms/transform_utils_test.cc index 92ebc358342..a93695babaa 100644 --- a/tensorflow/tools/graph_transforms/transform_utils_test.cc +++ b/tensorflow/tools/graph_transforms/transform_utils_test.cc @@ -19,12 +19,12 @@ limitations under the License. #include "tensorflow/cc/ops/nn_ops.h" #include "tensorflow/cc/ops/standard_ops.h" #include "tensorflow/core/framework/tensor_testutil.h" -#include "tensorflow/core/graph/equal_graph_def.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/lib/io/path.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/platform/test_benchmark.h" #include "tensorflow/core/public/session.h" +#include "tensorflow/core/util/equal_graph_def.h" namespace tensorflow { namespace graph_transforms {