diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 419700c2b66..cd788d37be3 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -314,17 +314,6 @@ alias( visibility = ["//tensorflow/core/kernels:friends"], ) -filegroup( - name = "quantize_training_hdrs", - srcs = [ - "graph/quantize_training.h", - ], - visibility = [ - "//tensorflow/core:__pkg__", - "//tensorflow/python:__pkg__", - ], -) - alias( name = "human_readable_json", actual = "//tensorflow/core/platform:human_readable_json", @@ -1002,17 +991,7 @@ tf_cuda_library( "common_runtime/function.h", "common_runtime/optimization_registry.h", "common_runtime/shape_refiner.h", - "graph/algorithm.h", - "graph/default_device.h", - "graph/gradients.h", - "graph/graph.h", - "graph/graph_constructor.h", - "graph/graph_def_builder.h", - "graph/graph_def_builder_util.h", - "graph/graph_node_util.h", - "graph/node_builder.h", - "graph/validate.h", - "graph/while_context.h", + "//tensorflow/core/graph:core_cpu_headers", "//tensorflow/core/public:session.h", "//tensorflow/core/public:session_options.h", ], @@ -1206,14 +1185,13 @@ cc_library( srcs = [ "common_runtime/function_testlib.cc", "common_runtime/kernel_benchmark_testlib.cc", - "graph/testlib.cc", + "//tensorflow/core/graph:testlib_srcs", ], hdrs = [ "common_runtime/function_testlib.h", "common_runtime/kernel_benchmark_testlib.h", "common_runtime/test_collective_executor_mgr.h", - "graph/benchmark_testlib.h", - "graph/testlib.h", + "//tensorflow/core/graph:testlib_headers", # TODO(josh11b): Drop this once users are depending on # kernels:ops_testutil instead. "//tensorflow/core/kernels:ops_testutil.h", @@ -1277,9 +1255,9 @@ tf_cuda_library( # ----------------------------------------------------------------------------- # MKL targets -cc_library( +alias( name = "mkl_graph_util", - hdrs = ["graph/mkl_graph_util.h"], + actual = "//tensorflow/core/graph:mkl_graph_util", ) # ----------------------------------------------------------------------------- @@ -1335,6 +1313,7 @@ filegroup( "//tensorflow/c:srcs", "//tensorflow/core/common_runtime/eager:srcs", "//tensorflow/core/framework:mobile_srcs_only_runtime", + "//tensorflow/core/graph:mobile_srcs_only_runtime", "//tensorflow/core/kernels:android_srcs", "//tensorflow/core/lib/io:mobile_srcs_only_runtime", "//tensorflow/core/profiler:mobile_srcs", @@ -1358,8 +1337,6 @@ filegroup( [ "common_runtime/**/*.cc", "common_runtime/**/*.h", - "graph/**/*.cc", - "graph/**/*.h", "lib/wav/*.cc", "lib/wav/*.h", ], @@ -1370,7 +1347,6 @@ filegroup( "**/*main.cc", "common_runtime/gpu/**/*", "common_runtime/gpu_device_factory.*", - "graph/dot.*", ], ), visibility = ["//visibility:public"], @@ -2188,12 +2164,7 @@ alias( ) FRAMEWORK_INTERNAL_PRIVATE_HEADERS = [ - "graph/edgeset.h", - "graph/graph.h", - "graph/graph_def_builder.h", - "graph/graph_node_util.h", - "graph/node_builder.h", - "graph/tensor_id.h", + "//tensorflow/core/graph:framework_internal_private_headers", "//tensorflow/core/util/sparse:framework_internal_private_headers_group", "//tensorflow/core/framework:framework_internal_private_hdrs", "//tensorflow/core/util:framework_internal_private_hdrs", @@ -2276,20 +2247,13 @@ cc_header_only_library( tf_cuda_library( name = "framework_internal_impl", srcs = FRAMEWORK_INTERNAL_PRIVATE_HEADERS + [ - "//tensorflow/core/util/sparse:framework_internal_impl_group", "//tensorflow/core/framework:framework_internal_impl_srcs", + "//tensorflow/core/graph:framework_internal_impl_srcs", "//tensorflow/core/util:framework_internal_impl_srcs", + "//tensorflow/core/util/sparse:framework_internal_impl_group", ] + glob( [ "example/**/*.cc", - "graph/edgeset.cc", - "graph/graph.cc", - "graph/graph_def_builder.cc", - "graph/graph_node_util.cc", - "graph/node_builder.cc", - "graph/tensor_id.cc", - "graph/while_context.h", - "graph/while_context.cc", ], exclude = [ "**/*test*", @@ -2415,46 +2379,10 @@ alias( # TODO(mrry): Refactor graph_constructor.cc so that it does not depend on code # in "common_runtime/", and then the entire "graph/" directory can be included # in this library. -GRAPH_HDRS = [ - "graph/algorithm.h", - "graph/collective_order.h", - "graph/colors.h", - "graph/control_flow.h", - "graph/costmodel.h", - "graph/default_device.h", - "graph/edgeset.h", - "graph/graph.h", - "graph/graph_constructor.h", # NOTE(mrry): Don't include the .cc since it depends on common_runtime. - "graph/graph_def_builder.h", - "graph/graph_def_builder_util.h", - "graph/graph_node_util.h", - "graph/graph_partition.h", - "graph/mkl_layout_pass.h", - "graph/mkl_tfconversion_pass.h", - "graph/node_builder.h", - "graph/optimizer_cse.h", - "graph/subgraph.h", - "graph/tensor_id.h", - "graph/testlib.h", - "graph/types.h", - "graph/validate.h", - "graph/while_context.h", -] - tf_cuda_library( name = "graph", - srcs = [ - "graph/algorithm.cc", - "graph/collective_order.cc", - "graph/colors.cc", - "graph/control_flow.cc", - "graph/costmodel.cc", - "graph/graph_partition.cc", - "graph/optimizer_cse.cc", - "graph/subgraph.cc", - "graph/validate.cc", - ], - hdrs = GRAPH_HDRS, + srcs = ["//tensorflow/core/graph:graph_srcs"], + hdrs = ["//tensorflow/core/graph:graph_headers"], deps = [ ":framework", ":framework_internal", @@ -2468,25 +2396,32 @@ tf_cuda_library( ], ) -CORE_CPU_BASE_HDRS = GRAPH_HDRS + [ - "common_runtime/device.h", - "common_runtime/device_factory.h", - "common_runtime/device_mgr.h", - "common_runtime/device_set.h", - "common_runtime/eval_const_tensor.h", - "common_runtime/graph_runner.h", - "common_runtime/metrics.h", - "common_runtime/shape_refiner.h", - "//tensorflow/core/framework:versions.h", - "common_runtime/process_function_library_runtime.h", - "common_runtime/function.h", - "common_runtime/scoped_allocator.h", - "common_runtime/scoped_allocator_mgr.h", -] +filegroup( + name = "core_cpu_base_headers", + srcs = [ + "common_runtime/device.h", + "common_runtime/device_factory.h", + "common_runtime/device_mgr.h", + "common_runtime/device_set.h", + "common_runtime/eval_const_tensor.h", + "common_runtime/function.h", + "common_runtime/graph_runner.h", + "common_runtime/metrics.h", + "common_runtime/process_function_library_runtime.h", + "common_runtime/scoped_allocator.h", + "common_runtime/scoped_allocator_mgr.h", + "common_runtime/shape_refiner.h", + "//tensorflow/core/framework:versions.h", + "//tensorflow/core/graph:graph_headers", + ], +) tf_cuda_library( name = "core_cpu_base", - hdrs = CORE_CPU_BASE_HDRS + ["//tensorflow/core/public:session.h"], + hdrs = [ + ":core_cpu_base_headers", + "//tensorflow/core/public:session.h", + ], copts = tf_copts(), deps = [":core_cpu_base_no_ops"] + if_static([ ":function_ops_op_lib", @@ -2502,16 +2437,18 @@ tf_cuda_library( name = "core_cpu_base_no_ops", srcs = [ "common_runtime/eval_const_tensor.cc", + "common_runtime/graph_optimizer.h", "common_runtime/scoped_allocator.cc", "common_runtime/scoped_allocator_mgr.cc", "common_runtime/shape_refiner.cc", - "common_runtime/graph_optimizer.h", - "graph/graph_constructor.cc", # Depends on common_runtime. - "graph/graph_def_builder_util.cc", # Depends on common_runtime. + "//tensorflow/core/graph:core_cpu_base_no_ops_srcs", "//tensorflow/core/public:session_options.h", "//tensorflow/core/public:version.h", - ] + CORE_CPU_BASE_HDRS, - hdrs = CORE_CPU_BASE_HDRS + ["//tensorflow/core/public:session.h"], + ], + hdrs = [ + ":core_cpu_base_headers", + "//tensorflow/core/public:session.h", + ], copts = tf_copts(), deps = [ ":graph", @@ -2527,62 +2464,65 @@ tf_cuda_library( ]), ) -CORE_CPU_LIB_HEADERS = CORE_CPU_BASE_HDRS + [ - "common_runtime/allocator_retry.h", - "common_runtime/shared_counter.h", - "common_runtime/base_collective_executor.h", - "common_runtime/bfc_allocator.h", - "common_runtime/hierarchical_tree_broadcaster.h", - "common_runtime/buf_rendezvous.h", - "common_runtime/build_graph_options.h", - "common_runtime/collective_executor_mgr.h", - "common_runtime/collective_param_resolver_local.h", - "common_runtime/collective_rma_local.h", - "common_runtime/collective_util.h", - "common_runtime/colocation_graph.h", - "common_runtime/constant_folding.h", - "common_runtime/copy_tensor.h", - "common_runtime/costmodel_manager.h", - "common_runtime/placer_inspection_required_ops_utils.h", - "common_runtime/debugger_state_interface.h", - "common_runtime/device_resolver_local.h", - "common_runtime/dma_helper.h", - "common_runtime/executor.h", - "common_runtime/executor_factory.h", - "common_runtime/graph_optimizer.h", - "common_runtime/input_colocation_exemption_registry.h", - "common_runtime/isolate_placer_inspection_required_ops_pass.h", - "common_runtime/local_device.h", - "common_runtime/lower_function_call_op.h", - "common_runtime/lower_if_op.h", - "common_runtime/lower_case_op.h", - "common_runtime/lower_functional_ops.h", - "common_runtime/lower_while_op.h", - "common_runtime/memory_types.h", - "common_runtime/mkl_cpu_allocator.h", - "common_runtime/optimization_registry.h", - "common_runtime/pending_counts.h", - "common_runtime/partitioning_utils.h", - "common_runtime/placer.h", - "common_runtime/process_util.h", - "common_runtime/inspecting_placer.h", - "common_runtime/profile_handler.h", - "common_runtime/renamed_device.h", - "common_runtime/rendezvous_mgr.h", - "common_runtime/rendezvous_util.h", - "common_runtime/ring_reducer.h", - "common_runtime/ring_alg.h", - "common_runtime/ring_gatherer.h", - "common_runtime/session_factory.h", - "common_runtime/single_threaded_cpu_device.h", - "common_runtime/stats_publisher_interface.h", - "common_runtime/step_stats_collector.h", - "common_runtime/threadpool_device.h", - "common_runtime/process_state.h", - "common_runtime/pool_allocator.h", - "graph/gradients.h", - "graph/quantize_training.h", -] + if_mkl(["graph/mkl_graph_util.h"]) +filegroup( + name = "core_cpu_lib_headers", + srcs = [ + ":core_cpu_base_headers", + "common_runtime/allocator_retry.h", + "common_runtime/shared_counter.h", + "common_runtime/base_collective_executor.h", + "common_runtime/bfc_allocator.h", + "common_runtime/hierarchical_tree_broadcaster.h", + "common_runtime/buf_rendezvous.h", + "common_runtime/build_graph_options.h", + "common_runtime/collective_executor_mgr.h", + "common_runtime/collective_param_resolver_local.h", + "common_runtime/collective_rma_local.h", + "common_runtime/collective_util.h", + "common_runtime/colocation_graph.h", + "common_runtime/constant_folding.h", + "common_runtime/copy_tensor.h", + "common_runtime/costmodel_manager.h", + "common_runtime/placer_inspection_required_ops_utils.h", + "common_runtime/debugger_state_interface.h", + "common_runtime/device_resolver_local.h", + "common_runtime/dma_helper.h", + "common_runtime/executor.h", + "common_runtime/executor_factory.h", + "common_runtime/graph_optimizer.h", + "common_runtime/input_colocation_exemption_registry.h", + "common_runtime/isolate_placer_inspection_required_ops_pass.h", + "common_runtime/local_device.h", + "common_runtime/lower_function_call_op.h", + "common_runtime/lower_if_op.h", + "common_runtime/lower_case_op.h", + "common_runtime/lower_functional_ops.h", + "common_runtime/lower_while_op.h", + "common_runtime/memory_types.h", + "common_runtime/mkl_cpu_allocator.h", + "common_runtime/optimization_registry.h", + "common_runtime/pending_counts.h", + "common_runtime/partitioning_utils.h", + "common_runtime/placer.h", + "common_runtime/process_util.h", + "common_runtime/inspecting_placer.h", + "common_runtime/profile_handler.h", + "common_runtime/renamed_device.h", + "common_runtime/rendezvous_mgr.h", + "common_runtime/rendezvous_util.h", + "common_runtime/ring_reducer.h", + "common_runtime/ring_alg.h", + "common_runtime/ring_gatherer.h", + "common_runtime/session_factory.h", + "common_runtime/single_threaded_cpu_device.h", + "common_runtime/stats_publisher_interface.h", + "common_runtime/step_stats_collector.h", + "common_runtime/threadpool_device.h", + "common_runtime/process_state.h", + "common_runtime/pool_allocator.h", + "//tensorflow/core/graph:core_cpu_lib_headers", + ] + if_mkl(["//tensorflow/core/graph:mkl_graph_util_header"]), +) tf_cuda_library( name = "core_cpu_impl", @@ -2649,15 +2589,12 @@ tf_cuda_library( "common_runtime/step_stats_collector.cc", "common_runtime/threadpool_device.cc", "common_runtime/threadpool_device_factory.cc", - "graph/gradients.cc", - "graph/mkl_layout_pass.cc", - "graph/mkl_tfconversion_pass.cc", - "graph/quantize_training.cc", + "//tensorflow/core/graph:core_cpu_impl_srcs", "//tensorflow/core/public:session.h", "//tensorflow/core/public:session_options.h", "//tensorflow/core/public:version.h", ], - hdrs = CORE_CPU_LIB_HEADERS, + hdrs = [":core_cpu_lib_headers"], copts = tf_copts() + tf_openmp_copts(), deps = [ ":bfc_allocator", @@ -2682,7 +2619,7 @@ tf_cuda_library( tf_cuda_library( name = "core_cpu_lib", - hdrs = CORE_CPU_LIB_HEADERS, + hdrs = [":core_cpu_lib_headers"], deps = [ ":core_cpu_base", "//tensorflow/core/grappler:grappler_item", @@ -2691,7 +2628,7 @@ tf_cuda_library( tf_cuda_library( name = "core_cpu_lib_no_ops", - hdrs = CORE_CPU_LIB_HEADERS, + hdrs = [":core_cpu_lib_headers"], deps = [ ":core_cpu_base_no_ops", "//tensorflow/core/grappler:grappler_item", @@ -2705,7 +2642,8 @@ tf_cuda_library( ], hdrs = [ "common_runtime/graph_execution_state.h", - ] + CORE_CPU_LIB_HEADERS, + ":core_cpu_lib_headers", + ], copts = tf_copts(), deps = [ ":framework", @@ -3214,28 +3152,6 @@ tf_cc_test( ], ) -tf_cc_test( - name = "quantize_training_test", - srcs = ["graph/quantize_training_test.cc"], - deps = [ - ":all_kernels", - ":core", - ":core_cpu", - ":core_cpu_internal", - ":direct_session_internal", - ":framework", - ":framework_internal", - ":lib", - ":lib_internal", - ":ops", - ":protos_all_cc", - ":test", - ":test_main", - ":testlib", - "//tensorflow/core/util:protos_test_cc", - ], -) - test_suite( name = "higher_level_tests", tests = [ @@ -3263,17 +3179,17 @@ tf_cc_tests( "common_runtime/session_test.cc", "common_runtime/threadpool_device_test.cc", "example/feature_util_test.cc", - "graph/algorithm_test.cc", - "graph/control_flow_test.cc", - "graph/edgeset_test.cc", - "graph/graph_def_builder_test.cc", - "graph/graph_partition_test.cc", - "graph/graph_test.cc", - "graph/node_builder_test.cc", - "graph/optimizer_cse_test.cc", - "graph/subgraph_test.cc", - "graph/tensor_id_test.cc", - "graph/validate_test.cc", + "//tensorflow/core/graph:algorithm_test.cc", + "//tensorflow/core/graph:control_flow_test.cc", + "//tensorflow/core/graph:edgeset_test.cc", + "//tensorflow/core/graph:graph_def_builder_test.cc", + "//tensorflow/core/graph:graph_partition_test.cc", + "//tensorflow/core/graph:graph_test.cc", + "//tensorflow/core/graph:node_builder_test.cc", + "//tensorflow/core/graph:optimizer_cse_test.cc", + "//tensorflow/core/graph:subgraph_test.cc", + "//tensorflow/core/graph:tensor_id_test.cc", + "//tensorflow/core/graph:validate_test.cc", "//tensorflow/core/util/sparse:higher_level_tests_group", ], create_named_test_suite = True, @@ -3318,7 +3234,7 @@ tf_cc_tests( size = "small", srcs = [ "common_runtime/collective_param_resolver_local_test.cc", - "graph/graph_constructor_test.cc", + "//tensorflow/core/graph:higher_level_tests_needing_kernels", ], linkopts = select({ "//tensorflow:macos": ["-headerpad_max_install_names"], @@ -3366,27 +3282,6 @@ tf_cc_test( ], ) -tf_cc_test( - name = "collective_order_test", - size = "small", - srcs = [ - "graph/collective_order_test.cc", - ], - deps = [ - ":core", - ":core_cpu", - ":core_cpu_internal", - ":framework", - ":framework_internal", - ":lib", - ":lib_internal", - ":ops", - ":protos_all_cc", - ":test", - "@com_google_googletest//:gtest_main", - ], -) - tf_cc_tests_gpu( name = "ring_reducer_test", size = "medium", @@ -3499,8 +3394,7 @@ tf_cc_test_mkl( name = "mkl_related_tests", size = "small", srcs = [ - "graph/mkl_layout_pass_test.cc", - "graph/mkl_tfconversion_pass_test.cc", + "//tensorflow/core/graph:mkl_related_tests", "//tensorflow/core/util:mkl_util_test_srcs", ], linkstatic = 1, diff --git a/tensorflow/core/graph/BUILD b/tensorflow/core/graph/BUILD new file mode 100644 index 00000000000..c8ea3ee1437 --- /dev/null +++ b/tensorflow/core/graph/BUILD @@ -0,0 +1,308 @@ +load( + "//tensorflow:tensorflow.bzl", + "tf_cc_test", +) + +package( + default_visibility = [ + "//tensorflow/core:__subpackages__", + ], + licenses = ["notice"], # Apache 2.0 +) + +# TODO(bmzhao): This target a holdover from tensorflow/core/BUILD. We +# will add proper dependencies once tf/core/graph/BUILD has granular +# targets added in a subsequent changes. +cc_library( + name = "mkl_graph_util", + hdrs = ["mkl_graph_util.h"], +) + +# TODO(bmzhao): Refactor this target to use granular dependencies +# after stage 4 of the TF build refactor is complete: +# https://github.com/tensorflow/community/pull/179 +tf_cc_test( + name = "quantize_training_test", + srcs = ["quantize_training_test.cc"], + deps = [ + "//tensorflow/core", + "//tensorflow/core:all_kernels", + "//tensorflow/core:core_cpu", + "//tensorflow/core:core_cpu_internal", + "//tensorflow/core:direct_session_internal", + "//tensorflow/core:framework", + "//tensorflow/core:framework_internal", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + "//tensorflow/core:ops", + "//tensorflow/core:protos_all_cc", + "//tensorflow/core:test", + "//tensorflow/core:test_main", + "//tensorflow/core:testlib", + "//tensorflow/core/util:protos_test_cc", + ], +) + +tf_cc_test( + name = "collective_order_test", + size = "small", + srcs = [ + "collective_order_test.cc", + ], + deps = [ + "//tensorflow/core", + "//tensorflow/core:core_cpu", + "//tensorflow/core:core_cpu_internal", + "//tensorflow/core:framework", + "//tensorflow/core:framework_internal", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + "//tensorflow/core:ops", + "//tensorflow/core:protos_all_cc", + "//tensorflow/core:test", + "@com_google_googletest//:gtest_main", + ], +) + +filegroup( + name = "core_cpu_headers", + srcs = [ + "algorithm.h", + "default_device.h", + "gradients.h", + "graph.h", + "graph_constructor.h", + "graph_def_builder.h", + "graph_def_builder_util.h", + "graph_node_util.h", + "node_builder.h", + "validate.h", + "while_context.h", + ], +) + +filegroup( + name = "framework_internal_private_headers", + srcs = [ + "edgeset.h", + "graph.h", + "graph_def_builder.h", + "graph_node_util.h", + "node_builder.h", + "tensor_id.h", + ], +) + +filegroup( + name = "framework_internal_impl_srcs", + srcs = [ + "edgeset.cc", + "graph.cc", + "graph_def_builder.cc", + "graph_node_util.cc", + "node_builder.cc", + "tensor_id.cc", + "while_context.cc", + "while_context.h", + ], +) + +# Note(bmzhao): This target is a holdover from the GRAPH_HDRS array +# in tensorflow/core/BUILD. This target contains all '.h' files under +# tensorflow/core/graph, except for the following: +# 'benchmark_testlib.h', 'mkl_graph_util.h', 'gradients.h', 'quantize_training.h'. +filegroup( + name = "graph_headers", + srcs = [ + "algorithm.h", + "collective_order.h", + "colors.h", + "control_flow.h", + "costmodel.h", + "default_device.h", + "edgeset.h", + "graph.h", + "graph_constructor.h", # NOTE(mrry): Don't include the .cc since it depends on common_runtime. + "graph_def_builder.h", + "graph_def_builder_util.h", + "graph_node_util.h", + "graph_partition.h", + "mkl_layout_pass.h", + "mkl_tfconversion_pass.h", + "node_builder.h", + "optimizer_cse.h", + "subgraph.h", + "tensor_id.h", + "testlib.h", + "types.h", + "validate.h", + "while_context.h", + ], +) + +filegroup( + name = "graph_srcs", + srcs = [ + "algorithm.cc", + "collective_order.cc", + "colors.cc", + "control_flow.cc", + "costmodel.cc", + "graph_partition.cc", + "optimizer_cse.cc", + "subgraph.cc", + "validate.cc", + ], +) + +filegroup( + name = "core_cpu_lib_headers", + srcs = [ + "gradients.h", + "quantize_training.h", + ], +) + +# Both of these files depend on common_runtime. +filegroup( + name = "core_cpu_base_no_ops_srcs", + srcs = [ + "graph_constructor.cc", + "graph_def_builder_util.cc", + ], +) + +filegroup( + name = "core_cpu_impl_srcs", + srcs = [ + "gradients.cc", + "mkl_layout_pass.cc", + "mkl_tfconversion_pass.cc", + "quantize_training.cc", + ], +) + +filegroup( + name = "testlib_headers", + srcs = [ + "benchmark_testlib.h", + "testlib.h", + ], +) + +filegroup( + name = "testlib_srcs", + srcs = [ + "testlib.cc", + ], +) + +filegroup( + name = "mkl_graph_util_header", + srcs = [ + "mkl_graph_util.h", + ], +) + +filegroup( + name = "higher_level_tests_needing_kernels", + srcs = [ + "graph_constructor_test.cc", + ], +) + +filegroup( + name = "mkl_related_tests", + srcs = [ + "mkl_layout_pass_test.cc", + "mkl_tfconversion_pass_test.cc", + ], +) + +filegroup( + name = "quantize_training_hdrs", + srcs = [ + "quantize_training.h", + ], + visibility = [ + "//tensorflow/python:__pkg__", + ], +) + +filegroup( + name = "mobile_srcs_only_runtime", + srcs = [ + "algorithm.cc", + "algorithm.h", + "benchmark_testlib.h", + "collective_order.cc", + "collective_order.h", + "colors.cc", + "colors.h", + "control_flow.cc", + "control_flow.h", + "costmodel.cc", + "costmodel.h", + "default_device.h", + "edgeset.cc", + "edgeset.h", + "gradients.cc", + "gradients.h", + "graph.cc", + "graph.h", + "graph_constructor.cc", + "graph_constructor.h", + "graph_def_builder.cc", + "graph_def_builder.h", + "graph_def_builder_util.cc", + "graph_def_builder_util.h", + "graph_node_util.cc", + "graph_node_util.h", + "graph_partition.cc", + "graph_partition.h", + "mkl_graph_util.h", + "mkl_layout_pass.cc", + "mkl_layout_pass.h", + "mkl_tfconversion_pass.cc", + "mkl_tfconversion_pass.h", + "node_builder.cc", + "node_builder.h", + "optimizer_cse.cc", + "optimizer_cse.h", + "quantize_training.cc", + "quantize_training.h", + "subgraph.cc", + "subgraph.h", + "tensor_id.cc", + "tensor_id.h", + "testlib.h", + "types.h", + "validate.cc", + "validate.h", + "while_context.cc", + "while_context.h", + ], +) + +# Note(bmzhao): Ideally we would use a filegroup to represent these tests instead. +# However, that causes tf_cc_tests to link all of these tests into a single object +# file. This breaks tensorflow/core:core_higher_level_tests, because some of these +# tests redefine the same symbol. This will be fixed by having granular tests +# instead, after phase 4 of the tensorflow's build refactoring: +# https://github.com/tensorflow/community/pull/179 +exports_files( + srcs = [ + "algorithm_test.cc", + "control_flow_test.cc", + "edgeset_test.cc", + "graph_def_builder_test.cc", + "graph_partition_test.cc", + "graph_test.cc", + "node_builder_test.cc", + "optimizer_cse_test.cc", + "subgraph_test.cc", + "tensor_id_test.cc", + "validate_test.cc", + ], + visibility = ["//tensorflow/core:__pkg__"], +) diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index 7b81d73dcd0..8194cf562ae 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -590,7 +590,7 @@ tf_python_pybind_extension( srcs = [ "training/quantize_training_wrapper.cc", ], - hdrs = ["//tensorflow/core:quantize_training_hdrs"], + hdrs = ["//tensorflow/core/graph:quantize_training_hdrs"], module_name = "_pywrap_quantize_training", deps = [ ":pybind11_lib",