From a1019d9526b0033e70322712625f2572407b4555 Mon Sep 17 00:00:00 2001 From: Gunhan Gulsoy Date: Mon, 5 Aug 2019 13:56:55 -0700 Subject: [PATCH] Create the initial BUILD file for tensorflow/core/platform folder PiperOrigin-RevId: 261762636 --- tensorflow/BUILD | 2 +- tensorflow/c/eager/BUILD | 4 +- tensorflow/cc/saved_model/BUILD | 2 +- tensorflow/cc/saved_model/python/BUILD | 2 +- tensorflow/compiler/jit/BUILD | 2 +- tensorflow/compiler/tests/BUILD | 2 +- tensorflow/compiler/tests/build_defs.bzl | 2 +- tensorflow/compiler/tf2tensorrt/BUILD | 4 +- tensorflow/compiler/tf2xla/BUILD | 2 +- tensorflow/compiler/tf2xla/python/BUILD | 2 +- tensorflow/compiler/xla/BUILD | 2 +- tensorflow/compiler/xla/python/BUILD | 2 +- tensorflow/compiler/xla/service/BUILD | 2 +- tensorflow/compiler/xla/service/gpu/BUILD | 2 +- .../compiler/xla/service/gpu/tests/BUILD | 2 +- .../compiler/xla/service/interpreter/BUILD | 2 +- tensorflow/compiler/xla/tests/BUILD | 2 +- tensorflow/compiler/xla/tests/build_defs.bzl | 2 +- tensorflow/compiler/xla/xla.bzl | 6 +- tensorflow/compiler/xrt/BUILD | 2 +- tensorflow/compiler/xrt/tests/BUILD | 2 +- tensorflow/contrib/boosted_trees/proto/BUILD | 2 +- tensorflow/contrib/cloud/kernels/BUILD | 2 +- tensorflow/contrib/decision_trees/proto/BUILD | 2 +- tensorflow/contrib/distribute/python/BUILD | 2 +- tensorflow/contrib/gdr/BUILD | 2 +- tensorflow/contrib/input_pipeline/BUILD | 2 +- tensorflow/contrib/mpi/BUILD | 2 +- tensorflow/contrib/mpi_collectives/BUILD | 2 +- tensorflow/contrib/reduce_slice_ops/BUILD | 2 +- tensorflow/contrib/rpc/BUILD | 2 +- .../contrib/rpc/python/kernel_tests/BUILD | 4 +- tensorflow/contrib/session_bundle/BUILD | 2 +- tensorflow/contrib/sparsemax/BUILD | 2 +- tensorflow/contrib/tensor_forest/BUILD | 2 +- .../contrib/tensor_forest/kernels/v4/BUILD | 2 +- tensorflow/contrib/tensor_forest/proto/BUILD | 2 +- tensorflow/contrib/tensorboard/BUILD | 2 +- tensorflow/contrib/training/BUILD | 2 +- tensorflow/contrib/verbs/BUILD | 2 +- tensorflow/core/BUILD | 613 ++++++++---------- tensorflow/core/common_runtime/data/BUILD | 2 +- tensorflow/core/debug/BUILD | 2 +- tensorflow/core/distributed_runtime/BUILD | 4 +- tensorflow/core/distributed_runtime/rpc/BUILD | 4 +- tensorflow/core/grappler/clusters/BUILD | 2 +- tensorflow/core/grappler/costs/BUILD | 2 +- tensorflow/core/grappler/optimizers/BUILD | 2 +- .../core/grappler/optimizers/data/BUILD | 2 +- .../optimizers/data/vectorization/BUILD | 2 +- tensorflow/core/grappler/utils/BUILD | 2 +- tensorflow/core/kernels/BUILD | 6 +- tensorflow/core/kernels/boosted_trees/BUILD | 2 +- tensorflow/core/kernels/rnn/BUILD | 2 +- tensorflow/core/nccl/BUILD | 2 +- tensorflow/core/platform/BUILD | 357 ++++++++++ .../core/platform/default/build_config.bzl | 77 ++- .../core/platform/default/build_config/BUILD | 2 +- tensorflow/core/platform/platform_strings.cc | 4 +- tensorflow/core/profiler/BUILD | 2 +- tensorflow/core/profiler/lib/BUILD | 2 +- tensorflow/core/protobuf/tpu/BUILD | 2 +- tensorflow/examples/adding_an_op/BUILD | 2 +- tensorflow/lite/toco/BUILD | 2 +- tensorflow/lite/tools/evaluation/proto/BUILD | 2 +- tensorflow/python/BUILD | 4 +- tensorflow/python/distribute/BUILD | 2 +- .../python/distribute/cluster_resolver/BUILD | 2 +- tensorflow/python/keras/BUILD | 1 - tensorflow/python/keras/distribute/BUILD | 2 +- tensorflow/python/kernel_tests/proto/BUILD | 5 +- tensorflow/python/tpu/BUILD | 2 +- tensorflow/stream_executor/BUILD | 4 +- tensorflow/stream_executor/cuda/BUILD | 4 +- tensorflow/stream_executor/gpu/BUILD | 2 +- tensorflow/stream_executor/platform/BUILD | 1 - .../stream_executor/platform/default/BUILD | 2 +- tensorflow/stream_executor/rocm/BUILD | 2 +- tensorflow/tensorflow.bzl | 6 +- tensorflow/tools/api/lib/BUILD | 2 +- tensorflow/tools/lib_package/BUILD | 2 +- tensorflow/tools/pip_package/BUILD | 2 +- tensorflow/tools/proto_text/BUILD | 2 +- 83 files changed, 759 insertions(+), 479 deletions(-) create mode 100644 tensorflow/core/platform/BUILD diff --git a/tensorflow/BUILD b/tensorflow/BUILD index 6003ee20f93..8214df98b70 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -7,7 +7,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_shared_object") load("//tensorflow:tensorflow.bzl", "tf_custom_op_library_additional_deps_impl") load("//tensorflow:tensorflow.bzl", "tf_native_cc_binary") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_binary_deps", ) load( diff --git a/tensorflow/c/eager/BUILD b/tensorflow/c/eager/BUILD index 7b6514bf5be..0c869f0c8bd 100644 --- a/tensorflow/c/eager/BUILD +++ b/tensorflow/c/eager/BUILD @@ -8,12 +8,12 @@ load( "tfe_xla_copts", ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_device_tracer_test_flags", "tf_kernel_tests_linkstatic", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/cc/saved_model/BUILD b/tensorflow/cc/saved_model/BUILD index 01752b65f2f..39b84922d13 100644 --- a/tensorflow/cc/saved_model/BUILD +++ b/tensorflow/cc/saved_model/BUILD @@ -10,7 +10,7 @@ load( "tf_cc_test", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", "if_static_and_not_mobile", ) diff --git a/tensorflow/cc/saved_model/python/BUILD b/tensorflow/cc/saved_model/python/BUILD index fca45c869fd..b1440655c72 100644 --- a/tensorflow/cc/saved_model/python/BUILD +++ b/tensorflow/cc/saved_model/python/BUILD @@ -1,7 +1,7 @@ # Description: # CLIF wrappers for TensorFlow SavedModels. -load("//tensorflow/core:platform/default/build_config.bzl", "tf_py_clif_cc") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_py_clif_cc") package( default_visibility = ["//visibility:public"], diff --git a/tensorflow/compiler/jit/BUILD b/tensorflow/compiler/jit/BUILD index 88b00cb2eea..1dc2ae0637c 100644 --- a/tensorflow/compiler/jit/BUILD +++ b/tensorflow/compiler/jit/BUILD @@ -1,7 +1,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test", "cc_header_only_library") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library", "tf_jit_compilation_passes_extra_deps") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library") package( default_visibility = [ diff --git a/tensorflow/compiler/tests/BUILD b/tensorflow/compiler/tests/BUILD index 33c2a835d8b..2f3ad9c316d 100644 --- a/tensorflow/compiler/tests/BUILD +++ b/tensorflow/compiler/tests/BUILD @@ -4,7 +4,7 @@ load("//tensorflow/compiler/aot:tfcompile.bzl", "tf_library") load("//tensorflow/compiler/tests:build_defs.bzl", "tf_xla_py_test") load("//tensorflow/compiler/tests:build_defs.bzl", "generate_backend_suites") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/compiler/tests/build_defs.bzl b/tensorflow/compiler/tests/build_defs.bzl index 96d389a81f2..a3b17e42fb0 100644 --- a/tensorflow/compiler/tests/build_defs.bzl +++ b/tensorflow/compiler/tests/build_defs.bzl @@ -3,7 +3,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "cuda_is_configured") load("//tensorflow/compiler/tests:plugin.bzl", "plugins") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", "tf_exec_compatible_with", ) diff --git a/tensorflow/compiler/tf2tensorrt/BUILD b/tensorflow/compiler/tf2tensorrt/BUILD index 298ce4802d8..3de09b24887 100644 --- a/tensorflow/compiler/tf2tensorrt/BUILD +++ b/tensorflow/compiler/tf2tensorrt/BUILD @@ -17,7 +17,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test") load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") load("//tensorflow:tensorflow.bzl", "tf_py_wrap_cc") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library", ) @@ -26,7 +26,7 @@ load("@local_config_tensorrt//:build_defs.bzl", "if_tensorrt") # NOTE: we always assume that if_static returns "otherwise" list in open source. load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", ) diff --git a/tensorflow/compiler/tf2xla/BUILD b/tensorflow/compiler/tf2xla/BUILD index 9aea4570cc7..e467ae280c8 100644 --- a/tensorflow/compiler/tf2xla/BUILD +++ b/tensorflow/compiler/tf2xla/BUILD @@ -1,6 +1,6 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_binary", "tf_cc_test", "tf_cuda_cc_test") load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library", "xla_py_proto_library") diff --git a/tensorflow/compiler/tf2xla/python/BUILD b/tensorflow/compiler/tf2xla/python/BUILD index 3cc551e08aa..eaba5d3c420 100644 --- a/tensorflow/compiler/tf2xla/python/BUILD +++ b/tensorflow/compiler/tf2xla/python/BUILD @@ -1,5 +1,5 @@ load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_py_clif_cc", ) load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") diff --git a/tensorflow/compiler/xla/BUILD b/tensorflow/compiler/xla/BUILD index 2bafc74c198..0a4448bdf40 100644 --- a/tensorflow/compiler/xla/BUILD +++ b/tensorflow/compiler/xla/BUILD @@ -1,7 +1,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test", "cc_header_only_library") load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_py", ) diff --git a/tensorflow/compiler/xla/python/BUILD b/tensorflow/compiler/xla/python/BUILD index 9fb297deebc..8cdf3220372 100644 --- a/tensorflow/compiler/xla/python/BUILD +++ b/tensorflow/compiler/xla/python/BUILD @@ -1,4 +1,4 @@ -load("//tensorflow/core:platform/default/build_config.bzl", "pyx_library") +load("//tensorflow/core/platform:default/build_config.bzl", "pyx_library") load("//tensorflow/compiler/xla:xla.bzl", "xla_py_test_deps", "xla_python_default_plugins") load("//tensorflow:tensorflow.bzl", "tf_pybind_extension") load("//tensorflow:tensorflow.bzl", "py_test", "tf_cc_test") diff --git a/tensorflow/compiler/xla/service/BUILD b/tensorflow/compiler/xla/service/BUILD index 591eeff9d97..581d3581b54 100644 --- a/tensorflow/compiler/xla/service/BUILD +++ b/tensorflow/compiler/xla/service/BUILD @@ -4,7 +4,7 @@ load("//tensorflow/compiler/xla/tests:build_defs.bzl", "xla_test") load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_py", ) load("//tensorflow:tensorflow.bzl", "tf_cc_test") diff --git a/tensorflow/compiler/xla/service/gpu/BUILD b/tensorflow/compiler/xla/service/gpu/BUILD index 7e120c9a89c..acd48be479b 100644 --- a/tensorflow/compiler/xla/service/gpu/BUILD +++ b/tensorflow/compiler/xla/service/gpu/BUILD @@ -3,7 +3,7 @@ load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", "tf_cuda_tests_tags", ) diff --git a/tensorflow/compiler/xla/service/gpu/tests/BUILD b/tensorflow/compiler/xla/service/gpu/tests/BUILD index a9b52d985af..67051b153b1 100644 --- a/tensorflow/compiler/xla/service/gpu/tests/BUILD +++ b/tensorflow/compiler/xla/service/gpu/tests/BUILD @@ -7,7 +7,7 @@ load("//tensorflow/compiler/xla/tests:build_defs.bzl", "xla_test") load("//tensorflow:tensorflow.bzl", "tf_cc_test") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/compiler/xla/service/interpreter/BUILD b/tensorflow/compiler/xla/service/interpreter/BUILD index ae7ccadbf97..1551870f734 100644 --- a/tensorflow/compiler/xla/service/interpreter/BUILD +++ b/tensorflow/compiler/xla/service/interpreter/BUILD @@ -1,5 +1,5 @@ load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", ) diff --git a/tensorflow/compiler/xla/tests/BUILD b/tensorflow/compiler/xla/tests/BUILD index 75ca50070ca..d4fe3231171 100644 --- a/tensorflow/compiler/xla/tests/BUILD +++ b/tensorflow/compiler/xla/tests/BUILD @@ -3,7 +3,7 @@ load("//tensorflow/compiler/xla/tests:build_defs.bzl", "generate_backend_suites", "generate_backend_test_macros", "xla_test", "xla_test_library") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) load("//tensorflow:tensorflow.bzl", "tf_cc_binary", "tf_cc_test") diff --git a/tensorflow/compiler/xla/tests/build_defs.bzl b/tensorflow/compiler/xla/tests/build_defs.bzl index 48719c6c47c..7153ace8789 100644 --- a/tensorflow/compiler/xla/tests/build_defs.bzl +++ b/tensorflow/compiler/xla/tests/build_defs.bzl @@ -4,7 +4,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "cuda_is_configured") load("//tensorflow/compiler/xla/tests:plugin.bzl", "plugins") load("//tensorflow:tensorflow.bzl", "tf_cc_test") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/compiler/xla/xla.bzl b/tensorflow/compiler/xla/xla.bzl index b446a811653..bfd79b537e3 100644 --- a/tensorflow/compiler/xla/xla.bzl +++ b/tensorflow/compiler/xla/xla.bzl @@ -1,15 +1,15 @@ """Wrapper around cc_proto_library used inside the XLA codebase.""" load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "cc_proto_library", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", ) load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) diff --git a/tensorflow/compiler/xrt/BUILD b/tensorflow/compiler/xrt/BUILD index 67402c11fcc..ce614904523 100644 --- a/tensorflow/compiler/xrt/BUILD +++ b/tensorflow/compiler/xrt/BUILD @@ -8,7 +8,7 @@ load( ) load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_py", ) diff --git a/tensorflow/compiler/xrt/tests/BUILD b/tensorflow/compiler/xrt/tests/BUILD index cc6ab9a3ed4..701125f63f0 100644 --- a/tensorflow/compiler/xrt/tests/BUILD +++ b/tensorflow/compiler/xrt/tests/BUILD @@ -1,6 +1,6 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test", "tf_cuda_cc_test") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/contrib/boosted_trees/proto/BUILD b/tensorflow/contrib/boosted_trees/proto/BUILD index 5211163652a..ca3dd545489 100644 --- a/tensorflow/contrib/boosted_trees/proto/BUILD +++ b/tensorflow/contrib/boosted_trees/proto/BUILD @@ -1,4 +1,4 @@ -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") package( licenses = ["notice"], # Apache 2.0 diff --git a/tensorflow/contrib/cloud/kernels/BUILD b/tensorflow/contrib/cloud/kernels/BUILD index 152d8836df5..d7bbbc10a17 100644 --- a/tensorflow/contrib/cloud/kernels/BUILD +++ b/tensorflow/contrib/cloud/kernels/BUILD @@ -10,7 +10,7 @@ load( # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library", ) diff --git a/tensorflow/contrib/decision_trees/proto/BUILD b/tensorflow/contrib/decision_trees/proto/BUILD index a0b2ca59d7b..ebbb9b3c052 100644 --- a/tensorflow/contrib/decision_trees/proto/BUILD +++ b/tensorflow/contrib/decision_trees/proto/BUILD @@ -1,5 +1,5 @@ load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library", "tf_pyclif_proto_library", ) diff --git a/tensorflow/contrib/distribute/python/BUILD b/tensorflow/contrib/distribute/python/BUILD index 8730dd45f3a..ccd742708e3 100644 --- a/tensorflow/contrib/distribute/python/BUILD +++ b/tensorflow/contrib/distribute/python/BUILD @@ -1,7 +1,7 @@ # Implementation of a prototype TF distributed computation library. load("//tensorflow/compiler/tests:build_defs.bzl", "tf_xla_py_test") -load("//tensorflow/core:platform/default/distribute.bzl", "distribute_py_test") +load("//tensorflow/core/platform:default/distribute.bzl", "distribute_py_test") load("//tensorflow:tensorflow.bzl", "cuda_py_test") package( diff --git a/tensorflow/contrib/gdr/BUILD b/tensorflow/contrib/gdr/BUILD index 0e8a493e15e..1eead8bff44 100644 --- a/tensorflow/contrib/gdr/BUILD +++ b/tensorflow/contrib/gdr/BUILD @@ -3,7 +3,7 @@ # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_cc", ) diff --git a/tensorflow/contrib/input_pipeline/BUILD b/tensorflow/contrib/input_pipeline/BUILD index 777399184e8..4fd9e2c5b95 100644 --- a/tensorflow/contrib/input_pipeline/BUILD +++ b/tensorflow/contrib/input_pipeline/BUILD @@ -12,7 +12,7 @@ load( "tf_kernel_library", ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_kernel_tests_linkstatic", ) load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") diff --git a/tensorflow/contrib/mpi/BUILD b/tensorflow/contrib/mpi/BUILD index 23f90cf77ef..7522e88f238 100644 --- a/tensorflow/contrib/mpi/BUILD +++ b/tensorflow/contrib/mpi/BUILD @@ -31,7 +31,7 @@ filegroup( # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_cc", ) diff --git a/tensorflow/contrib/mpi_collectives/BUILD b/tensorflow/contrib/mpi_collectives/BUILD index 5e848c9e7cf..f8072ac1e81 100644 --- a/tensorflow/contrib/mpi_collectives/BUILD +++ b/tensorflow/contrib/mpi_collectives/BUILD @@ -7,7 +7,7 @@ package(default_visibility = [ licenses(["notice"]) # Apache 2.0 load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_mpi_lib_defines", "tf_proto_library_cc", ) diff --git a/tensorflow/contrib/reduce_slice_ops/BUILD b/tensorflow/contrib/reduce_slice_ops/BUILD index c98ae649f3e..aeb2c67317e 100644 --- a/tensorflow/contrib/reduce_slice_ops/BUILD +++ b/tensorflow/contrib/reduce_slice_ops/BUILD @@ -1,7 +1,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test", "tf_custom_op_library", "tf_gen_op_libs", "tf_gen_op_wrapper_py", "tf_kernel_library") load("//tensorflow:tensorflow.bzl", "cuda_py_test") load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_kernel_tests_linkstatic") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_kernel_tests_linkstatic") package( licenses = ["notice"], # Apache 2.0 diff --git a/tensorflow/contrib/rpc/BUILD b/tensorflow/contrib/rpc/BUILD index a037be78387..f092af17a90 100644 --- a/tensorflow/contrib/rpc/BUILD +++ b/tensorflow/contrib/rpc/BUILD @@ -1,4 +1,4 @@ -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") package( default_visibility = ["//visibility:public"], diff --git a/tensorflow/contrib/rpc/python/kernel_tests/BUILD b/tensorflow/contrib/rpc/python/kernel_tests/BUILD index 47413aa8692..db197d10cd8 100644 --- a/tensorflow/contrib/rpc/python/kernel_tests/BUILD +++ b/tensorflow/contrib/rpc/python/kernel_tests/BUILD @@ -1,7 +1,7 @@ load("//tensorflow:tensorflow.bzl", "tf_py_test") load("//tensorflow:tensorflow.bzl", "tf_cc_shared_object") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") # Placeholder for loading internal BUILD rule. package( diff --git a/tensorflow/contrib/session_bundle/BUILD b/tensorflow/contrib/session_bundle/BUILD index 5e4f5f53cd7..737d6866283 100644 --- a/tensorflow/contrib/session_bundle/BUILD +++ b/tensorflow/contrib/session_bundle/BUILD @@ -10,7 +10,7 @@ load( "py_test", "tf_cc_test", ) -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") # Placeholder: load("//tensorflow:tensorflow.bzl", "tf_portable_proto_lib") package( diff --git a/tensorflow/contrib/sparsemax/BUILD b/tensorflow/contrib/sparsemax/BUILD index 69cbb120ef8..7bb73f5a415 100644 --- a/tensorflow/contrib/sparsemax/BUILD +++ b/tensorflow/contrib/sparsemax/BUILD @@ -9,7 +9,7 @@ load( "tf_py_test", ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_kernel_tests_linkstatic", ) diff --git a/tensorflow/contrib/tensor_forest/BUILD b/tensorflow/contrib/tensor_forest/BUILD index fdd7e1e1ee3..ca246f912be 100644 --- a/tensorflow/contrib/tensor_forest/BUILD +++ b/tensorflow/contrib/tensor_forest/BUILD @@ -8,7 +8,7 @@ load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py") load("//tensorflow:tensorflow.bzl", "tf_custom_op_library") load("//tensorflow:tensorflow.bzl", "tf_kernel_library") load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") package( default_visibility = ["//visibility:public"], diff --git a/tensorflow/contrib/tensor_forest/kernels/v4/BUILD b/tensorflow/contrib/tensor_forest/kernels/v4/BUILD index d205b255402..71bfa5bbb8c 100644 --- a/tensorflow/contrib/tensor_forest/kernels/v4/BUILD +++ b/tensorflow/contrib/tensor_forest/kernels/v4/BUILD @@ -1,7 +1,7 @@ # TensorFlow code for training random forests. load("//tensorflow:tensorflow.bzl", "tf_cc_test") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") package( default_visibility = ["//visibility:public"], diff --git a/tensorflow/contrib/tensor_forest/proto/BUILD b/tensorflow/contrib/tensor_forest/proto/BUILD index efa696fffe6..702dbed7fc0 100644 --- a/tensorflow/contrib/tensor_forest/proto/BUILD +++ b/tensorflow/contrib/tensor_forest/proto/BUILD @@ -1,4 +1,4 @@ -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") package( default_visibility = ["//visibility:public"], diff --git a/tensorflow/contrib/tensorboard/BUILD b/tensorflow/contrib/tensorboard/BUILD index e5efe4b16d8..801fe67b069 100644 --- a/tensorflow/contrib/tensorboard/BUILD +++ b/tensorflow/contrib/tensorboard/BUILD @@ -2,7 +2,7 @@ # TensorBoard module containing volatile or experimental code. # For platform specific build config -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") load("//tensorflow:tensorflow.bzl", "py_test") package( diff --git a/tensorflow/contrib/training/BUILD b/tensorflow/contrib/training/BUILD index cae2ab1d89b..c42e87a9618 100644 --- a/tensorflow/contrib/training/BUILD +++ b/tensorflow/contrib/training/BUILD @@ -1,7 +1,7 @@ # Description: # contains parts of TensorFlow that are experimental or unstable and which are not supported. -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") load("//tensorflow:tensorflow.bzl", "py_test") package( diff --git a/tensorflow/contrib/verbs/BUILD b/tensorflow/contrib/verbs/BUILD index fac783b7d5f..b0035269d40 100644 --- a/tensorflow/contrib/verbs/BUILD +++ b/tensorflow/contrib/verbs/BUILD @@ -5,7 +5,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cuda_library") # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_cc", ) diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 313360377db..6b65beca674 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -7,7 +7,7 @@ # ":protos_all_cc" - exports all core TensorFlow protos # ":protos_all_py" - py_proto_library version (Google-internal) # ":lib" - exports the public non-test headers for: -# platform/: Platform-specific code and external dependencies +# //third_party/tensorflow/core/platform:: Platform-specific code and external dependencies # lib/: Low-level libraries that are not TensorFlow-specific # ":test" - test equivalent of ":lib". # This is currently public, but may be made internal in the @@ -104,7 +104,7 @@ load("//tensorflow:tensorflow.bzl", "tf_version_info_genrule") # For platform specific build config load( - ":platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_additional_cloud_kernel_deps", "tf_additional_cloud_op_deps", @@ -112,36 +112,26 @@ load( "tf_additional_cupti_wrapper_deps", "tf_additional_device_tracer_cuda_deps", "tf_additional_device_tracer_deps", - "tf_additional_device_tracer_srcs", "tf_additional_device_tracer_test_flags", "tf_additional_gdr_lib_defines", "tf_additional_human_readable_json_deps", "tf_additional_lib_defines", "tf_additional_lib_deps", - "tf_additional_lib_hdrs", - "tf_additional_lib_srcs", "tf_additional_libdevice_data", "tf_additional_libdevice_deps", - "tf_additional_libdevice_srcs", "tf_additional_minimal_lib_srcs", "tf_additional_monitoring_hdrs", - "tf_additional_monitoring_srcs", "tf_additional_mpi_lib_defines", "tf_additional_numa_copts", "tf_additional_numa_deps", "tf_additional_numa_lib_defines", - "tf_additional_proto_hdrs", - "tf_additional_proto_srcs", "tf_additional_test_deps", - "tf_additional_test_srcs", "tf_additional_verbs_lib_defines", "tf_grpc_service_all", "tf_jspb_proto_library", "tf_kernel_tests_linkstatic", "tf_lib_proto_compiler_deps", "tf_lib_proto_parsing_deps", - "tf_platform_hdrs", - "tf_platform_srcs", "tf_proto_library", "tf_proto_library_cc", "tf_protos_all", @@ -151,7 +141,7 @@ load( "tf_pyclif_proto_library", ) load( - ":platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_dynamic_kernels", "if_static", "tf_cuda_tests_tags", @@ -326,42 +316,38 @@ tf_proto_library( cc_library( name = "lib_platform", hdrs = [ - "platform/platform.h", + "//tensorflow/core/platform:platform.h", ], ) filegroup( name = "platform_base_hdrs", srcs = [ - "platform/byte_order.h", - "platform/cord.h", - "platform/env_time.h", - "platform/logging.h", - "platform/macros.h", - "platform/platform_strings.h", - "platform/tstring.h", - "platform/types.h", + "//tensorflow/core/platform:byte_order.h", + "//tensorflow/core/platform:cord.h", + "//tensorflow/core/platform:env_time.h", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:platform_strings.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", ], visibility = ["//visibility:private"], ) cc_library( name = "platform_base", - srcs = tf_platform_hdrs([ - "integral_types.h", - "logging.h", - ]) + tf_platform_srcs([ - "logging.cc", - "env_time.cc", - ]) + [ - "platform/env_time.cc", - ], hdrs = [":platform_base_hdrs"], copts = tf_copts(), tags = ["avoid_dep"], visibility = [":__subpackages__"], deps = [ ":lib_platform", + "//tensorflow/core/platform:byte_order", + "//tensorflow/core/platform:env_time", + "//tensorflow/core/platform:logging", + "//tensorflow/core/platform:macros", + "//tensorflow/core/platform:types", "//tensorflow/core/platform/default/build_config:base", "@com_google_absl//absl/base", "@com_google_absl//absl/strings", @@ -381,13 +367,13 @@ cc_library( filegroup( name = "platform_port_hdrs", srcs = [ - "platform/cpu_info.h", - "platform/dynamic_annotations.h", - "platform/init_main.h", - "platform/mem.h", - "platform/mutex.h", - "platform/numa.h", - "platform/thread_annotations.h", + "//tensorflow/core/platform:cpu_info.h", + "//tensorflow/core/platform:dynamic_annotations.h", + "//tensorflow/core/platform:init_main.h", + "//tensorflow/core/platform:mem.h", + "//tensorflow/core/platform:mutex.h", + "//tensorflow/core/platform:numa.h", + "//tensorflow/core/platform:thread_annotations.h", ], visibility = ["//visibility:private"], ) @@ -396,24 +382,18 @@ filegroup( filegroup( name = "platform_port_internal_hdrs", srcs = [ - "platform/demangle.h", - "platform/host_info.h", - "platform/snappy.h", + "//tensorflow/core/platform:demangle.h", + "//tensorflow/core/platform:host_info.h", + "//tensorflow/core/platform:snappy.h", ], visibility = ["//visibility:private"], ) cc_library( name = "platform_port", - srcs = tf_platform_hdrs([ - "cpu_info.h", - "dynamic_annotations.h", - "thread_annotations.h", - "mutex.h", - ]) + tf_platform_srcs([ - "port.cc", - ]) + [ - "platform/cpu_info.cc", + srcs = [ + "//tensorflow/core/platform:cpu_info.cc", + "//tensorflow/core/platform:legacy_platform_port_srcs", ], hdrs = [ ":platform_port_hdrs", @@ -433,7 +413,7 @@ cc_library( filegroup( name = "platform_protobuf_hdrs", srcs = [ - "platform/protobuf.h", + "//tensorflow/core/platform:protobuf.h", ], visibility = ["//visibility:private"], ) @@ -442,19 +422,18 @@ filegroup( filegroup( name = "platform_protobuf_internal_hdrs", srcs = [ - "platform/protobuf_internal.h", + "//tensorflow/core/platform:protobuf_internal.h", ], visibility = ["//visibility:private"], ) cc_library( name = "platform_protobuf", - srcs = tf_platform_hdrs([ - "protobuf.h", - ]) + [ - "platform/protobuf.cc", - "platform/protobuf_util.cc", + srcs = [ "lib/core/status.h", + "//tensorflow/core/platform:protobuf.cc", + "//tensorflow/core/platform:protobuf.h", + "//tensorflow/core/platform:protobuf_util.cc", ], hdrs = [ ":platform_protobuf_hdrs", @@ -475,7 +454,7 @@ cc_library( name = "grpc_services", srcs = [], hdrs = [ - "platform/grpc_services.h", + "//tensorflow/core/platform:grpc_services.h", ], copts = tf_copts(), visibility = ["//visibility:public"], @@ -484,8 +463,8 @@ cc_library( cc_library( name = "human_readable_json", - srcs = tf_platform_srcs(["human_readable_json.cc"]), - hdrs = ["platform/human_readable_json.h"], + srcs = ["//tensorflow/core/platform:legacy_human_readable_json_src"], + hdrs = ["//tensorflow/core/platform:human_readable_json.h"], copts = tf_copts(), visibility = ["//visibility:public"], deps = [ @@ -496,8 +475,8 @@ cc_library( cc_library( name = "logger", - srcs = ["platform/logger.cc"], - hdrs = ["platform/logger.h"], + srcs = ["//tensorflow/core/platform:logger.cc"], + hdrs = ["//tensorflow/core/platform:logger.h"], copts = tf_copts(), visibility = ["//visibility:public"], deps = [ @@ -511,9 +490,9 @@ cc_library( filegroup( name = "platform_env_hdrs", srcs = [ - "platform/env.h", - "platform/file_statistics.h", - "platform/file_system.h", + "//tensorflow/core/platform:env.h", + "//tensorflow/core/platform:file_statistics.h", + "//tensorflow/core/platform:file_system.h", ], visibility = ["//visibility:private"], ) @@ -522,21 +501,17 @@ filegroup( filegroup( name = "platform_env_internal_hdrs", srcs = [ - "platform/load_library.h", + "//tensorflow/core/platform:load_library.h", ], visibility = ["//visibility:private"], ) cc_library( name = "platform_env", - srcs = tf_platform_srcs([ - "env.cc", - "load_library.cc", - ]) + tf_platform_hdrs([ - "wide_char.h", - ]) + [ - "platform/env.cc", - "platform/file_system.cc", + srcs = [ + "//tensorflow/core/platform:env.cc", + "//tensorflow/core/platform:file_system.cc", + "//tensorflow/core/platform:legacy_platform_env_srcs", ], hdrs = [ ":platform_env_hdrs", @@ -563,19 +538,17 @@ cc_library( filegroup( name = "platform_file_system_hdrs", srcs = [ - "platform/file_system_helper.h", - "platform/null_file_system.h", + "//tensorflow/core/platform:file_system_helper.h", + "//tensorflow/core/platform:null_file_system.h", ], visibility = ["//visibility:private"], ) cc_library( name = "platform_file_system", - srcs = tf_platform_srcs([ - ]) + tf_platform_hdrs([ - "windows_file_system.h", - ]) + [ - "platform/file_system_helper.cc", + srcs = [ + "//tensorflow/core/platform:file_system_helper.cc", + "//tensorflow/core/platform:legacy_file_system_hdrs", ], hdrs = [ ":platform_file_system_hdrs", @@ -591,44 +564,44 @@ cc_library( cc_library( name = "platform_strings", - srcs = tf_platform_srcs([ - "platform/platform_strings.cc", - "platform/platform_strings_computed.h", - ]), + srcs = [ + "//tensorflow/core/platform:platform_strings.cc", + "//tensorflow/core/platform:platform_strings_computed.h", + ], hdrs = [ - "platform/platform_strings.h", + "//tensorflow/core/platform:platform_strings.h", ], visibility = [":__subpackages__"], - deps = [":lib"], + deps = [], ) filegroup( name = "platform_other_hdrs", srcs = [ - "platform/abi.h", - "platform/context.h", - "platform/cpu_feature_guard.h", - "platform/error.h", - "platform/fingerprint.h", - "platform/monitoring.h", - "platform/net.h", - "platform/notification.h", - "platform/prefetch.h", - "platform/profile_utils/android_armv7a_cpu_utils_helper.h", - "platform/profile_utils/clock_cycle_profiler.h", - "platform/profile_utils/cpu_utils.h", - "platform/profile_utils/i_cpu_utils_helper.h", - "platform/stacktrace.h", - "platform/stacktrace_handler.h", - "platform/strong_hash.h", - "platform/subprocess.h", + "//tensorflow/core/platform:abi.h", + "//tensorflow/core/platform:context.h", + "//tensorflow/core/platform:cpu_feature_guard.h", + "//tensorflow/core/platform:error.h", + "//tensorflow/core/platform:fingerprint.h", + "//tensorflow/core/platform:monitoring.h", + "//tensorflow/core/platform:net.h", + "//tensorflow/core/platform:notification.h", + "//tensorflow/core/platform:prefetch.h", + "//tensorflow/core/platform:profile_utils/android_armv7a_cpu_utils_helper.h", + "//tensorflow/core/platform:profile_utils/clock_cycle_profiler.h", + "//tensorflow/core/platform:profile_utils/cpu_utils.h", + "//tensorflow/core/platform:profile_utils/i_cpu_utils_helper.h", + "//tensorflow/core/platform:stacktrace.h", + "//tensorflow/core/platform:stacktrace_handler.h", + "//tensorflow/core/platform:strong_hash.h", + "//tensorflow/core/platform:subprocess.h", ] + tf_additional_monitoring_hdrs(), visibility = ["//visibility:private"], ) tf_cc_test( name = "platform_unbounded_work_queue_test", - srcs = ["platform/unbounded_work_queue_test.cc"], + srcs = ["//tensorflow/core/platform:unbounded_work_queue_test.cc"], deps = [ ":framework", ":lib", @@ -644,37 +617,24 @@ tf_cc_test( filegroup( name = "platform_other_internal_hdrs", srcs = [ - "platform/denormal.h", - "platform/setround.h", - "platform/tracing.h", + "//tensorflow/core/platform:denormal.h", + "//tensorflow/core/platform:setround.h", + "//tensorflow/core/platform:tracing.h", ], visibility = ["//visibility:private"], ) cc_library( name = "platform_other", - srcs = tf_platform_srcs([ - "subprocess.cc", - "net.cc", - "tracing.cc", - ]) + tf_platform_hdrs([ - "tracing.h", - "error.h", - "context.h", - "fingerprint.h", - "notification.h", - "stacktrace.h", - "strong_hash.h", - "subprocess.h", - "tracing_impl.h", - ]) + [ - "platform/cpu_feature_guard.cc", - "platform/setround.cc", - "platform/tracing.cc", - "platform/denormal.cc", - "platform/profile_utils/android_armv7a_cpu_utils_helper.cc", - "platform/profile_utils/clock_cycle_profiler.cc", - "platform/profile_utils/cpu_utils.cc", + srcs = [ + "//tensorflow/core/platform:cpu_feature_guard.cc", + "//tensorflow/core/platform:denormal.cc", + "//tensorflow/core/platform:legacy_platform_other_srcs", + "//tensorflow/core/platform:profile_utils/android_armv7a_cpu_utils_helper.cc", + "//tensorflow/core/platform:profile_utils/clock_cycle_profiler.cc", + "//tensorflow/core/platform:profile_utils/cpu_utils.cc", + "//tensorflow/core/platform:setround.cc", + "//tensorflow/core/platform:tracing.cc", ], hdrs = [ ":platform_other_hdrs", @@ -689,6 +649,8 @@ cc_library( ":platform_env", ":platform_port", ":platform_protobuf", + "//tensorflow/core/platform:abi", + "//tensorflow/core/platform:stacktrace", "//tensorflow/core/platform/default/build_config:other", "//tensorflow/core/platform/default/build_config:platformlib", "//tensorflow/core/platform/default/build_config:port", @@ -700,35 +662,43 @@ cc_library( # don't have to depend on lib/platformlib. cc_library( name = "lib_proto_parsing", - srcs = glob(tf_additional_proto_srcs()), + srcs = [ + "//tensorflow/core/platform:protobuf.cc", + ], hdrs = [ + "lib/bfloat16/bfloat16.h", "lib/core/errors.h", "lib/core/status.h", "lib/core/stringpiece.h", "lib/strings/numbers.h", "lib/strings/strcat.h", - "platform/init_main.h", - "platform/logging.h", - "platform/macros.h", - "platform/platform.h", - "platform/protobuf.h", - "platform/tstring.h", - "platform/types.h", - "platform/windows/cpu_info.h", - "lib/bfloat16/bfloat16.h", - ] + tf_additional_proto_hdrs(), + "//tensorflow/core/platform:init_main.h", + "//tensorflow/core/platform:legacy_proto_hdrs", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:protobuf.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", + "//tensorflow/core/platform:windows/cpu_info.h", + ], copts = tf_copts(), deps = tf_lib_proto_parsing_deps() + [ ":platform_base", "@com_google_absl//absl/strings", "@double_conversion//:double-conversion", + "//tensorflow/core/platform:macros", + "//tensorflow/core/platform:logging", + "//tensorflow/core/platform:platform", + "//tensorflow/core/platform:types", + "//tensorflow/core/platform:cpu_info", ], ) cc_library( name = "lib_proto_compiler", hdrs = [ - "platform/protobuf_compiler.h", + "//tensorflow/core/platform:protobuf_compiler.h", ], copts = tf_copts(), deps = tf_lib_proto_compiler_deps() + [ @@ -837,32 +807,14 @@ cc_library( ], ) -cc_library( - name = "abi", - srcs = ["platform/abi.cc"], - hdrs = ["platform/abi.h"], - deps = [":platform_base"], -) - -cc_library( - name = "stacktrace", - srcs = glob(["platform/*/stacktrace.h"]), - hdrs = ["platform/stacktrace.h"], - deps = [ - ":abi", - ":lib_platform", - "//tensorflow/core/platform/default/build_config:stacktrace", - ], -) - cc_library( name = "stacktrace_handler", - srcs = ["platform/stacktrace_handler.cc"], - hdrs = ["platform/stacktrace_handler.h"], + srcs = ["//tensorflow/core/platform:stacktrace_handler.cc"], + hdrs = ["//tensorflow/core/platform:stacktrace_handler.h"], deps = [ - ":abi", ":lib_platform", - ":stacktrace", + "//tensorflow/core/platform:abi", + "//tensorflow/core/platform:stacktrace", ], ) @@ -886,14 +838,15 @@ cc_library( name = "test", testonly = 1, srcs = [ - "platform/test.cc", "util/reporter.cc", - ] + tf_additional_test_srcs(), + "//tensorflow/core/platform:legacy_test_srcs", + "//tensorflow/core/platform:test.cc", + ], hdrs = [ "lib/core/status_test_util.h", - "platform/test.h", - "platform/test_benchmark.h", "util/reporter.h", + "//tensorflow/core/platform:test.h", + "//tensorflow/core/platform:test_benchmark.h", ], copts = tf_copts(), linkopts = select({ @@ -919,11 +872,11 @@ cc_library( name = "test_lite", testonly = 1, srcs = [ - "platform/test.cc", + "//tensorflow/core/platform:test.cc", ], hdrs = [ - "platform/test.h", - "platform/test_benchmark.h", + "//tensorflow/core/platform:test.h", + "//tensorflow/core/platform:test_benchmark.h", ], copts = tf_copts(), deps = [ @@ -1179,29 +1132,31 @@ cc_library( cc_library( name = "framework_lite", - srcs = tf_additional_minimal_lib_srcs(), + srcs = [ + "//tensorflow/core/platform:legacy_minimal_lib_srcs", + ], hdrs = [ "framework/numeric_types.h", "framework/tensor_types.h", "framework/type_traits.h", "lib/bfloat16/bfloat16.h", - "platform/byte_order.h", - "platform/default/dynamic_annotations.h", - "platform/default/integral_types.h", - "platform/default/logging.h", - "platform/default/mutex.h", - "platform/default/thread_annotations.h", - "platform/dynamic_annotations.h", - "platform/macros.h", - "platform/mutex.h", - "platform/platform.h", - "platform/prefetch.h", - "platform/protobuf.h", - "platform/thread_annotations.h", - "platform/tstring.h", - "platform/types.h", - "platform/cpu_info.h", - ] + if_windows(["platform/windows/integral_types.h"]), + "//tensorflow/core/platform:byte_order.h", + "//tensorflow/core/platform:default/dynamic_annotations.h", + "//tensorflow/core/platform:default/integral_types.h", + "//tensorflow/core/platform:default/logging.h", + "//tensorflow/core/platform:default/mutex.h", + "//tensorflow/core/platform:default/thread_annotations.h", + "//tensorflow/core/platform:dynamic_annotations.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:mutex.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:prefetch.h", + "//tensorflow/core/platform:protobuf.h", + "//tensorflow/core/platform:thread_annotations.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", + "//tensorflow/core/platform:cpu_info.h", + ] + if_windows(["//tensorflow/core/platform:windows/integral_types.h"]), visibility = ["//visibility:public"], deps = [ @@ -1209,6 +1164,7 @@ cc_library( ] + [ "//third_party/eigen3", "//tensorflow/core/platform/default/build_config:minimal", + "//tensorflow/core/platform:types", ], ) @@ -1827,6 +1783,7 @@ filegroup( ":error_codes_proto_text_srcs", "//tensorflow/core/platform/default/build_config:android_srcs", "//tensorflow/core/util/ctc:android_srcs", + "//tensorflow/core/platform:legacy_srcs_no_runtime", "//tensorflow/core/profiler:mobile_srcs", ] + glob( [ @@ -1835,8 +1792,6 @@ filegroup( "framework/**/*.cc", "lib/**/*.h", "lib/**/*.cc", - "platform/**/*.h", - "platform/**/*.cc", "public/**/*.h", "util/**/*.h", "util/**/*.cc", @@ -1857,22 +1812,6 @@ filegroup( "util/events_writer.*", "util/stats_calculator.*", "util/reporter.*", - "platform/**/cuda_libdevice_path.*", - "platform/**/logger.cc", - # Exclude env_time and logging to avoid collisions with - # :platform_base, a common dependency for downstream targets. - "platform/**/env_time.cc", - "platform/**/logging.cc", - "platform/default/test_benchmark.*", - "platform/cuda.h", - "platform/rocm.h", - "platform/google/**/*", - "platform/hadoop/**/*", - "platform/gif.h", - "platform/jpeg.h", - "platform/png.h", - "platform/stream_executor.*", - "platform/windows/**/*", "user_ops/**/*.cu.cc", "util/ctc/*.h", "util/ctc/*.cc", @@ -2127,7 +2066,7 @@ filegroup( filegroup( name = "android_test_srcs", # TODO(andrewharp/nhua): - # make more test-related sources portable e.g. "platform/test.cc", + # make more test-related sources portable e.g. "//tensorflow/core/platform:test.cc", srcs = [ ":framework/fake_input.cc", ":framework/fake_input.h", @@ -2135,10 +2074,10 @@ filegroup( ":framework/shape_inference_testutil.h", ":framework/tensor_testutil.cc", ":framework/tensor_testutil.h", - ":platform/test.cc", - ":platform/test.h", ":util/reporter.cc", ":util/reporter.h", + "//tensorflow/core/platform:test.cc", + "//tensorflow/core/platform:test.h", ], visibility = ["//visibility:public"], ) @@ -2151,9 +2090,9 @@ filegroup( ":framework/shape_inference_testutil.h", ":framework/tensor_testutil.cc", ":framework/tensor_testutil.h", - ":platform/test.h", ":util/reporter.cc", ":util/reporter.h", + "//tensorflow/core/platform:test.h", ], visibility = ["//visibility:public"], ) @@ -2418,27 +2357,22 @@ tf_proto_library_cc( ], ) -LIB_INTERNAL_PRIVATE_HEADERS = ["framework/resource_handle.h"] + glob( +LIB_INTERNAL_PRIVATE_HEADERS = [ + "framework/resource_handle.h", + "//tensorflow/core/platform:legacy_lib_internal_headers", +] + glob( [ "lib/**/*.h", - "platform/*.h", - "platform/profile_utils/**/*.h", ], exclude = [ "**/*test*", "lib/gif/**/*", "lib/jpeg/**/*", "lib/png/**/*", - "platform/gif.h", - "platform/jpeg.h", - "platform/png.h", - "platform/**/cuda.h", - "platform/**/rocm.h", - "platform/**/stream_executor.h", ], ) -LIB_INTERNAL_PUBLIC_HEADERS = tf_additional_lib_hdrs() + [ +LIB_INTERNAL_PUBLIC_HEADERS = [ "lib/core/blocking_counter.h", "lib/core/refcount.h", "lib/gtl/edit_distance.h", @@ -2469,18 +2403,19 @@ LIB_INTERNAL_PUBLIC_HEADERS = tf_additional_lib_hdrs() + [ "lib/strings/proto_serialization.h", "lib/strings/scanner.h", "lib/wav/wav_io.h", - "platform/annotation.h", - "platform/demangle.h", - "platform/denormal.h", - "platform/host_info.h", - "platform/platform.h", - "platform/monitoring.h", - "platform/protobuf_internal.h", - "platform/setround.h", - "platform/snappy.h", - "platform/tensor_coding.h", - "platform/tracing.h", - "platform/unbounded_work_queue.h", + "//tensorflow/core/platform:annotation.h", + "//tensorflow/core/platform:demangle.h", + "//tensorflow/core/platform:denormal.h", + "//tensorflow/core/platform:host_info.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:monitoring.h", + "//tensorflow/core/platform:protobuf_internal.h", + "//tensorflow/core/platform:setround.h", + "//tensorflow/core/platform:snappy.h", + "//tensorflow/core/platform:tensor_coding.h", + "//tensorflow/core/platform:tracing.h", + "//tensorflow/core/platform:unbounded_work_queue.h", + "//tensorflow/core/platform:legacy_platform_lib_hdrs", "util/env_var.h", ] @@ -2488,11 +2423,12 @@ cc_library( name = "annotation", srcs = [], hdrs = [ - "platform/annotation.h", + "//tensorflow/core/platform:annotation.h", ], copts = tf_copts(), visibility = ["//visibility:public"], deps = [ + "//tensorflow/core/platform:macros", "@com_google_absl//absl/strings", ], ) @@ -2536,8 +2472,6 @@ cc_library( srcs = LIB_INTERNAL_PRIVATE_HEADERS + glob( [ "lib/**/*.cc", - "platform/*.cc", - "platform/profile_utils/**/*.cc", "util/env_var.cc", ], exclude = [ @@ -2547,46 +2481,25 @@ cc_library( "lib/gif/**/*", "lib/jpeg/**/*", "lib/png/**/*", - "platform/**/env_time.cc", - "platform/**/monitoring.cc", - "platform/**/cuda_libdevice_path.cc", - "platform/**/device_tracer.cc", - "platform/**/logger.cc", - "platform/**/logging.cc", - "platform/**/human_readable_json.cc", - "platform/abi.cc", - "platform/protobuf.cc", ], - ) + tf_additional_lib_srcs( - exclude = [ - "**/*test*", - "platform/**/cuda.h", - "platform/**/cuda_libdevice_path.cc", - "platform/**/rocm.h", - "platform/**/monitoring.cc", - "platform/**/stream_executor.h", - "platform/**/env_time.cc", - "platform/**/device_tracer.cc", - "platform/**/logger.cc", - "platform/**/logging.cc", - "platform/**/human_readable_json.cc", - "platform/abi.cc", - ] + - # Protobuf deps already included through the ":lib_proto_parsing" - # dependency. - tf_additional_proto_srcs(), - ) + tf_additional_monitoring_srcs(), + ) + [ + "//tensorflow/core/platform:legacy_monitoring_srcs", + "//tensorflow/core/platform:legacy_platform_lib_srcs", + "//tensorflow/core/platform:legacy_lib_internal_srcs", + ], hdrs = LIB_INTERNAL_PUBLIC_HEADERS, copts = tf_copts(), defines = LIB_INTERNAL_DEFINES, deps = tf_additional_lib_deps() + [ + ":core_stringpiece", ":lib_hash_crc32c_accelerate_internal", ":lib_proto_parsing", - ":abi", - ":core_stringpiece", + ":platform_strings", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "//third_party/eigen3", + "//tensorflow/core/platform:abi", + "//tensorflow/core/platform:cpu_info", "//tensorflow/core/platform/default/build_config:platformlib", "@snappy", "@zlib_archive//:zlib", @@ -2608,7 +2521,7 @@ cc_library( name = "gif_internal", srcs = [ "lib/gif/gif_io.cc", - "platform/gif.h", + "//tensorflow/core/platform:gif.h", ], hdrs = ["lib/gif/gif_io.h"], copts = tf_copts(), @@ -2629,7 +2542,7 @@ cc_library( srcs = [ "lib/jpeg/jpeg_handle.cc", "lib/jpeg/jpeg_mem.cc", - "platform/jpeg.h", + "//tensorflow/core/platform:jpeg.h", ], hdrs = [ "lib/jpeg/jpeg_handle.h", @@ -2655,16 +2568,16 @@ cc_library( "lib/bfloat16/bfloat16.h", "lib/core/stringpiece.h", "lib/png/png_io.h", - "platform/byte_order.h", - "platform/cpu_info.h", - "platform/default/integral_types.h", - "platform/default/logging.h", - "platform/logging.h", - "platform/macros.h", - "platform/platform.h", - "platform/png.h", - "platform/tstring.h", - "platform/types.h", + "//tensorflow/core/platform:byte_order.h", + "//tensorflow/core/platform:cpu_info.h", + "//tensorflow/core/platform:default/integral_types.h", + "//tensorflow/core/platform:default/logging.h", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:png.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", ], copts = tf_copts(), linkopts = select({ @@ -2686,13 +2599,13 @@ cc_library( name = "tflite_portable_logging", hdrs = [ "lib/bfloat16/bfloat16.h", - "platform/default/integral_types.h", - "platform/default/logging.h", - "platform/logging.h", - "platform/macros.h", - "platform/platform.h", - "platform/tstring.h", - "platform/types.h", + "//tensorflow/core/platform:default/integral_types.h", + "//tensorflow/core/platform:default/logging.h", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", ], copts = tf_copts(), linkopts = ["-ldl"], @@ -2707,23 +2620,23 @@ cc_library( srcs = if_android([ "lib/jpeg/jpeg_handle.cc", "lib/jpeg/jpeg_mem.cc", - "platform/jpeg.h", + "//tensorflow/core/platform:jpeg.h", ]), hdrs = [ "lib/bfloat16/bfloat16.h", "lib/core/stringpiece.h", "lib/jpeg/jpeg_handle.h", "lib/jpeg/jpeg_mem.h", - "platform/default/dynamic_annotations.h", - "platform/default/integral_types.h", - "platform/default/logging.h", - "platform/dynamic_annotations.h", - "platform/logging.h", - "platform/macros.h", - "platform/mem.h", - "platform/platform.h", - "platform/tstring.h", - "platform/types.h", + "//tensorflow/core/platform:default/dynamic_annotations.h", + "//tensorflow/core/platform:default/integral_types.h", + "//tensorflow/core/platform:default/logging.h", + "//tensorflow/core/platform:dynamic_annotations.h", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:mem.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", ], copts = tf_copts(), linkopts = ["-ldl"], @@ -2739,7 +2652,7 @@ cc_library( name = "android_gif_internal", srcs = if_android([ "lib/gif/gif_io.cc", - "platform/gif.h", + "//tensorflow/core/platform:gif.h", "lib/strings/strcat.h", "lib/strings/numbers.h", ]), @@ -2748,16 +2661,16 @@ cc_library( "lib/core/stringpiece.h", "lib/gif/gif_io.h", "lib/gtl/cleanup.h", - "platform/default/dynamic_annotations.h", - "platform/default/integral_types.h", - "platform/default/logging.h", - "platform/dynamic_annotations.h", - "platform/logging.h", - "platform/macros.h", - "platform/mem.h", - "platform/platform.h", - "platform/tstring.h", - "platform/types.h", + "//tensorflow/core/platform:default/dynamic_annotations.h", + "//tensorflow/core/platform:default/integral_types.h", + "//tensorflow/core/platform:default/logging.h", + "//tensorflow/core/platform:dynamic_annotations.h", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:mem.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", ], copts = tf_copts(), linkopts = ["-ldl"], @@ -2773,21 +2686,21 @@ cc_library( name = "android_png_internal", srcs = if_android([ "lib/png/png_io.cc", - "platform/png.h", + "//tensorflow/core/platform:png.h", ]), hdrs = [ "lib/bfloat16/bfloat16.h", "lib/core/stringpiece.h", "lib/png/png_io.h", - "platform/byte_order.h", - "platform/cpu_info.h", - "platform/default/integral_types.h", - "platform/default/logging.h", - "platform/logging.h", - "platform/macros.h", - "platform/platform.h", - "platform/tstring.h", - "platform/types.h", + "//tensorflow/core/platform:byte_order.h", + "//tensorflow/core/platform:cpu_info.h", + "//tensorflow/core/platform:default/integral_types.h", + "//tensorflow/core/platform:default/logging.h", + "//tensorflow/core/platform:logging.h", + "//tensorflow/core/platform:macros.h", + "//tensorflow/core/platform:platform.h", + "//tensorflow/core/platform:tstring.h", + "//tensorflow/core/platform:types.h", ], copts = tf_copts(), linkopts = ["-ldl"], @@ -3068,11 +2981,11 @@ cc_header_only_library( tf_cuda_library( name = "stream_executor", - srcs = ["platform/stream_executor.h"], + srcs = ["//tensorflow/core/platform:stream_executor.h"], hdrs = [ - "platform/cuda.h", - "platform/rocm.h", - "platform/stream_executor.h", + "//tensorflow/core/platform:cuda.h", + "//tensorflow/core/platform:rocm.h", + "//tensorflow/core/platform:stream_executor.h", ], deps = [ "//tensorflow/core/platform/default/build_config:stream_executor", @@ -3083,9 +2996,9 @@ tf_cuda_library( # and does not include any cuda dependencies. cc_library( name = "stream_executor_no_cuda", - srcs = ["platform/stream_executor.h"], + srcs = ["//tensorflow/core/platform:stream_executor.h"], hdrs = [ - "platform/stream_executor_no_cuda.h", + "//tensorflow/core/platform:stream_executor_no_cuda.h", ], visibility = ["//visibility:public"], deps = [ @@ -3466,7 +3379,7 @@ cc_library( cc_library( name = "regexp_internal", hdrs = [ - "platform/regexp.h", + "//tensorflow/core/platform:regexp.h", ], visibility = [ "//tensorflow/compiler:__subpackages__", @@ -3526,7 +3439,9 @@ cc_library( tf_cuda_library( name = "device_tracer", - srcs = tf_additional_device_tracer_srcs(), + srcs = [ + "//tensorflow/core/platform:legacy_device_tracer_srcs", + ], copts = tf_copts(), cuda_deps = tf_additional_cupti_wrapper_deps() + tf_additional_device_tracer_cuda_deps(), visibility = [ @@ -3801,7 +3716,7 @@ cc_library( cc_library( name = "test_main", testonly = 1, - srcs = ["platform/test_main.cc"], + srcs = ["//tensorflow/core/platform:test_main.cc"], copts = tf_copts(), linkopts = select({ "//tensorflow:windows": [], @@ -3822,7 +3737,7 @@ cc_library( cc_library( name = "test_lite_main", testonly = 1, - srcs = ["platform/test_main.cc"], + srcs = ["//tensorflow/core/platform:test_main.cc"], copts = tf_copts(), deps = [ # TODO(ahentz): we don't want to depend on "lib" here. It used to be @@ -3890,16 +3805,16 @@ tf_cc_tests( "lib/strings/strcat_test.cc", "lib/strings/stringprintf_test.cc", "lib/wav/wav_io_test.cc", - "platform/fingerprint_test.cc", - "platform/integral_types_test.cc", - "platform/logging_test.cc", - "platform/mutex_test.cc", - "platform/net_test.cc", - "platform/port_test.cc", - "platform/profile_utils/cpu_utils_test.cc", - "platform/stacktrace_handler_test.cc", - "platform/subprocess_test.cc", - "platform/vmodule_benchmark_test.cc", + "//tensorflow/core/platform:fingerprint_test.cc", + "//tensorflow/core/platform:integral_types_test.cc", + "//tensorflow/core/platform:logging_test.cc", + "//tensorflow/core/platform:mutex_test.cc", + "//tensorflow/core/platform:net_test.cc", + "//tensorflow/core/platform:port_test.cc", + "//tensorflow/core/platform:profile_utils/cpu_utils_test.cc", + "//tensorflow/core/platform:stacktrace_handler_test.cc", + "//tensorflow/core/platform:subprocess_test.cc", + "//tensorflow/core/platform:vmodule_benchmark_test.cc", ], deps = [ ":core_cpu_internal", @@ -3918,7 +3833,7 @@ tf_cc_tests( tf_cc_test( name = "vmodule_test", - srcs = ["platform/vmodule_test.cc"], + srcs = ["//tensorflow/core/platform:vmodule_test.cc"], tags = ["optonly"], deps = [ ":lib", @@ -3949,7 +3864,7 @@ tf_cc_test( tf_cc_test( name = "platform_strings_test", size = "small", - srcs = ["platform/platform_strings_test.cc"], + srcs = ["//tensorflow/core/platform:platform_strings_test.cc"], features = ["-dynamic_link_test_srcs"], # see go/dynamic_link_test_srcs deps = [ ":lib", @@ -3960,7 +3875,7 @@ tf_cc_test( tf_cc_test( name = "platform_env_test", size = "small", - srcs = ["platform/env_test.cc"], + srcs = ["//tensorflow/core/platform:env_test.cc"], deps = [ ":lib", ":lib_internal", @@ -3975,7 +3890,7 @@ tf_cc_test( tf_cc_test( name = "platform_fake_python_env_test", size = "small", - srcs = ["platform/fake_python_env_test.cc"], + srcs = ["//tensorflow/core/platform:fake_python_env_test.cc"], args = [ "/some/path/to/pythontest.runfiles/org_tensorflow/stuff/to/run.py", ], @@ -3998,7 +3913,7 @@ tf_cc_test( tf_cc_test( name = "platform_abi_test", size = "small", - srcs = ["platform/abi_test.cc"], + srcs = ["//tensorflow/core/platform:abi_test.cc"], deps = [ ":framework", ":lib", @@ -4014,7 +3929,7 @@ tf_cc_test( tf_cc_test( name = "platform_numa_test", size = "small", - srcs = ["platform/numa_test.cc"], + srcs = ["//tensorflow/core/platform:numa_test.cc"], tags = [ # This test will not pass unless it has access to all NUMA nodes # on the executing machine. @@ -4036,7 +3951,7 @@ tf_cc_test( tf_cc_test( name = "platform_setround_test", size = "small", - srcs = ["platform/setround_test.cc"], + srcs = ["//tensorflow/core/platform:setround_test.cc"], tags = [ "noasan", "noclang", @@ -4055,7 +3970,7 @@ tf_cc_test( tf_cc_test( name = "platform_file_system_test", size = "small", - srcs = ["platform/file_system_test.cc"], + srcs = ["//tensorflow/core/platform:file_system_test.cc"], deps = [ ":lib", ":lib_internal", @@ -5367,7 +5282,7 @@ tf_cc_test( tf_cc_test_gpu( name = "device_tracer_test", size = "small", - srcs = ["platform/device_tracer_test.cc"], + srcs = ["//tensorflow/core/platform:device_tracer_test.cc"], args = ["--heap_check=local"] + tf_additional_device_tracer_test_flags(), linkstatic = tf_kernel_tests_linkstatic(), @@ -5591,10 +5506,12 @@ filegroup( cc_library( name = "cuda_libdevice_path", - srcs = tf_additional_libdevice_srcs(), - hdrs = ["platform/cuda_libdevice_path.h"], + srcs = [ + "//tensorflow/core/platform:legacy_libdevice_srcs", + ], copts = tf_copts(), data = tf_additional_libdevice_data(), + textual_hdrs = ["//tensorflow/core/platform:cuda_libdevice_path.h"], visibility = ["//visibility:public"], deps = [ ":lib", diff --git a/tensorflow/core/common_runtime/data/BUILD b/tensorflow/core/common_runtime/data/BUILD index 190901847a2..e5102d037ac 100644 --- a/tensorflow/core/common_runtime/data/BUILD +++ b/tensorflow/core/common_runtime/data/BUILD @@ -3,7 +3,7 @@ package( ) load("//tensorflow:tensorflow.bzl", "tf_cc_test") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_protos_all") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_protos_all") cc_library( name = "standalone", diff --git a/tensorflow/core/debug/BUILD b/tensorflow/core/debug/BUILD index 135f73d3222..462b447a019 100644 --- a/tensorflow/core/debug/BUILD +++ b/tensorflow/core/debug/BUILD @@ -22,7 +22,7 @@ load( # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_kernel_tests_linkstatic", "tf_proto_library", diff --git a/tensorflow/core/distributed_runtime/BUILD b/tensorflow/core/distributed_runtime/BUILD index b33b785a600..d2c48aa5f81 100644 --- a/tensorflow/core/distributed_runtime/BUILD +++ b/tensorflow/core/distributed_runtime/BUILD @@ -8,11 +8,11 @@ load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test") # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_kernel_tests_linkstatic", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/core/distributed_runtime/rpc/BUILD b/tensorflow/core/distributed_runtime/rpc/BUILD index d7126ac1c1b..50b381b2622 100644 --- a/tensorflow/core/distributed_runtime/rpc/BUILD +++ b/tensorflow/core/distributed_runtime/rpc/BUILD @@ -12,11 +12,11 @@ load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_tests") # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_kernel_tests_linkstatic", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/core/grappler/clusters/BUILD b/tensorflow/core/grappler/clusters/BUILD index 5d16e4e182d..20bed36d1b8 100644 --- a/tensorflow/core/grappler/clusters/BUILD +++ b/tensorflow/core/grappler/clusters/BUILD @@ -2,7 +2,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("//tensorflow:tensorflow.bzl", "tf_cc_test") load("//tensorflow:tensorflow.bzl", "tf_cuda_library") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/core/grappler/costs/BUILD b/tensorflow/core/grappler/costs/BUILD index f1746a2e7e3..af79d098fb8 100644 --- a/tensorflow/core/grappler/costs/BUILD +++ b/tensorflow/core/grappler/costs/BUILD @@ -1,6 +1,6 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test", "tf_cuda_library") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library", "tf_protos_grappler", diff --git a/tensorflow/core/grappler/optimizers/BUILD b/tensorflow/core/grappler/optimizers/BUILD index 8dadc48b728..89440622341 100644 --- a/tensorflow/core/grappler/optimizers/BUILD +++ b/tensorflow/core/grappler/optimizers/BUILD @@ -3,7 +3,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test") # Platform specific build config load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", ) diff --git a/tensorflow/core/grappler/optimizers/data/BUILD b/tensorflow/core/grappler/optimizers/data/BUILD index bd34ba77ffa..71e23bb1421 100644 --- a/tensorflow/core/grappler/optimizers/data/BUILD +++ b/tensorflow/core/grappler/optimizers/data/BUILD @@ -1,5 +1,5 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_protos_all") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_protos_all") package( default_visibility = [ diff --git a/tensorflow/core/grappler/optimizers/data/vectorization/BUILD b/tensorflow/core/grappler/optimizers/data/vectorization/BUILD index 2247f81b1d1..d0417977492 100644 --- a/tensorflow/core/grappler/optimizers/data/vectorization/BUILD +++ b/tensorflow/core/grappler/optimizers/data/vectorization/BUILD @@ -1,5 +1,5 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_protos_all") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_protos_all") package( default_visibility = ["//visibility:private"], diff --git a/tensorflow/core/grappler/utils/BUILD b/tensorflow/core/grappler/utils/BUILD index d193907eda4..fef002b2788 100644 --- a/tensorflow/core/grappler/utils/BUILD +++ b/tensorflow/core/grappler/utils/BUILD @@ -1,6 +1,6 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_test") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_protos_grappler", ) diff --git a/tensorflow/core/kernels/BUILD b/tensorflow/core/kernels/BUILD index d43391746e1..a8a6e46b4f2 100644 --- a/tensorflow/core/kernels/BUILD +++ b/tensorflow/core/kernels/BUILD @@ -20,15 +20,15 @@ load("//tensorflow:tensorflow.bzl", "if_nccl") load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test") load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_tests") load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_kernel_tests_linkstatic", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", "tf_cuda_tests_tags", ) diff --git a/tensorflow/core/kernels/boosted_trees/BUILD b/tensorflow/core/kernels/boosted_trees/BUILD index f6414c8d38e..3c2bc929cc3 100644 --- a/tensorflow/core/kernels/boosted_trees/BUILD +++ b/tensorflow/core/kernels/boosted_trees/BUILD @@ -7,7 +7,7 @@ load( "tf_kernel_library", ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library", ) diff --git a/tensorflow/core/kernels/rnn/BUILD b/tensorflow/core/kernels/rnn/BUILD index 2975e8bc02c..d70cb362bae 100644 --- a/tensorflow/core/kernels/rnn/BUILD +++ b/tensorflow/core/kernels/rnn/BUILD @@ -7,7 +7,7 @@ load( "tf_kernel_library", ) load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) diff --git a/tensorflow/core/nccl/BUILD b/tensorflow/core/nccl/BUILD index b1f7bcfaaff..f48061cbac2 100644 --- a/tensorflow/core/nccl/BUILD +++ b/tensorflow/core/nccl/BUILD @@ -6,7 +6,7 @@ load("//tensorflow:tensorflow.bzl", "tf_cuda_cc_test") load("//tensorflow:tensorflow.bzl", "tf_copts") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", ) diff --git a/tensorflow/core/platform/BUILD b/tensorflow/core/platform/BUILD new file mode 100644 index 00000000000..d57185d3a94 --- /dev/null +++ b/tensorflow/core/platform/BUILD @@ -0,0 +1,357 @@ +# Description: +# TensorFlow Base libraries. +# This package contains the following libraries: +# - Platform dependent libraries that require different implementations +# across different OSs or environments. +# - STL replacement libraries rest of TensorFlow should depend on. +# +# The libraries in this package are not allowed to have ANY dependencies +# to any TensorFlow code outside this package. + +load( + "//tensorflow/core/platform:default/build_config.bzl", + "tf_additional_device_tracer_srcs", + "tf_additional_lib_hdrs", + "tf_additional_lib_srcs", + "tf_additional_libdevice_srcs", + "tf_additional_minimal_lib_srcs", + "tf_additional_monitoring_srcs", + "tf_additional_proto_hdrs", + "tf_additional_test_srcs", + "tf_env_time_srcs", + "tf_logging_absl_deps", + "tf_platform_hdrs", + "tf_platform_srcs", +) +load( + "//tensorflow:tensorflow.bzl", + "tf_copts", +) + +package( + default_visibility = [ + "//tensorflow:__subpackages__", + ], + licenses = ["notice"], # Apache 2.0 +) + +cc_library( + name = "byte_order", + hdrs = ["byte_order.h"], +) + +cc_library( + name = "abi", + srcs = ["abi.cc"], + hdrs = ["abi.h"], + deps = [":types"], +) + +cc_library( + name = "macros", + hdrs = ["macros.h"], +) + +cc_library( + name = "platform", + hdrs = ["platform.h"], +) + +cc_library( + name = "tstring", + hdrs = ["tstring.h"], +) + +cc_library( + name = "types", + srcs = tf_platform_hdrs(["integral_types.h"]), + hdrs = ["types.h"], + deps = [ + ":platform", + ":tstring", + "//tensorflow/core/platform/default/build_config:base", + ], +) + +cc_library( + name = "env_time", + srcs = ["env_time.cc"] + tf_env_time_srcs(), + hdrs = ["env_time.h"], + deps = [ + ":types", + ], +) + +cc_library( + name = "logging", + srcs = tf_platform_hdrs(["logging.h"]) + tf_platform_srcs(["logging.cc"]), + hdrs = ["logging.h"], + deps = [ + ":env_time", + ":macros", + ":platform", + ":types", + "//tensorflow/core/platform/default/build_config:base", + ] + tf_logging_absl_deps(), +) + +cc_library( + name = "cpu_info", + srcs = ["cpu_info.cc"] + tf_platform_srcs([ + "cpu_info.h", + ]), + hdrs = ["cpu_info.h"], + copts = tf_copts(), + deps = [ + ":byte_order", + ":logging", + ":platform", + ":types", + ], +) + +cc_library( + name = "stacktrace", + srcs = glob(["*/stacktrace.h"]), + hdrs = ["stacktrace.h"], + deps = [ + ":abi", + ":platform", + "//tensorflow/core/platform/default/build_config:stacktrace", + ], +) + +# -------------------------------------------------------------------------- +# Below libraries are here only to make sure the legacy build rules +# in tensorflow/core/BUILD are working! +# +# DO NOT add any new dependencies on these rules! +# +# -------------------------------------------------------------------------- + +filegroup( + name = "legacy_platform_lib_hdrs", + srcs = tf_additional_lib_hdrs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_platform_lib_srcs", + srcs = tf_additional_lib_srcs( + exclude = [ + "*test*", + "**/*test*", + "**/cuda.h", + "**/cuda_libdevice_path.cc", + "**/rocm.h", + "**/monitoring.cc", + "**/stream_executor.h", + "**/env_time.cc", + "**/device_tracer.cc", + "**/logger.cc", + "**/logging.cc", + "**/human_readable_json.cc", + "abi.cc", + "cpu_info.cc", + "platform_strings.cc", + "protobuf.cc", + ], + ), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_proto_hdrs", + srcs = tf_additional_proto_hdrs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_srcs_no_runtime", + srcs = glob( + [ + "**/*.h", + "**/*.cc", + ], + exclude = [ + "*test.*", + "*testutil*", + "*testlib*", + "*main.cc", + "**/*test.*", + "**/*testutil*", + "**/*testlib*", + "**/*main.cc", + "**/cuda_libdevice_path.*", + "**/logger.cc", + # Exclude env_time and logging to avoid collisions with + # :platform_base, a common dependency for downstream targets. + "**/env_time.cc", + "**/logging.cc", + "default/test_benchmark.*", + "cuda.h", + "rocm.h", + "google/**/*", + "hadoop/**/*", + "gif.h", + "jpeg.h", + "png.h", + "stream_executor.*", + "windows/**/*", + ], + ), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_lib_internal_headers", + srcs = glob( + [ + "*.h", + "profile_utils/**/*.h", + ], + exclude = [ + "gif.h", + "jpeg.h", + "png.h", + "**/cuda.h", + "**/rocm.h", + "**/stream_executor.h", + ], + ), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_lib_internal_srcs", + srcs = glob( + [ + "*.cc", + "profile_utils/**/*.cc", + ], + exclude = [ + "*test*", + "**/*test*", + "**/env_time.cc", + "**/monitoring.cc", + "**/cuda_libdevice_path.cc", + "**/device_tracer.cc", + "**/logger.cc", + "**/logging.cc", + "**/human_readable_json.cc", + "abi.cc", + "cpu_info.cc", + "platform_strings.cc", + "protobuf.cc", + ], + ), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_test_srcs", + srcs = tf_additional_test_srcs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_device_tracer_srcs", + srcs = tf_additional_device_tracer_srcs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_minimal_lib_srcs", + srcs = tf_additional_minimal_lib_srcs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_libdevice_srcs", + srcs = tf_additional_libdevice_srcs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_monitoring_srcs", + srcs = tf_additional_monitoring_srcs(), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_platform_port_srcs", + srcs = tf_platform_hdrs([ + "cpu_info.h", + "dynamic_annotations.h", + "thread_annotations.h", + "mutex.h", + ]) + tf_platform_srcs([ + "port.cc", + ]), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_platform_env_srcs", + srcs = tf_platform_srcs([ + "env.cc", + "load_library.cc", + ]) + tf_platform_hdrs([ + "wide_char.h", + ]), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_file_system_hdrs", + srcs = tf_platform_hdrs([ + "windows_file_system.h", + ]), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_platform_other_srcs", + srcs = tf_platform_srcs([ + "subprocess.cc", + "net.cc", + "tracing.cc", + ]) + tf_platform_hdrs([ + "tracing.h", + "error.h", + "context.h", + "fingerprint.h", + "notification.h", + "strong_hash.h", + "subprocess.h", + "tracing_impl.h", + ]), + visibility = ["//tensorflow/core:__pkg__"], +) + +filegroup( + name = "legacy_human_readable_json_src", + srcs = tf_platform_srcs(["human_readable_json.cc"]), + visibility = ["//tensorflow/core:__pkg__"], +) + +# TODO(gunan): Remove the following once references in core/BUILD is removed. +exports_files( + glob( + [ + "*", + "**", + ], + exclude = [ + "abi.h", + "byte_order.h", + "cpu_info.cc", + "cpu_info.h", + "logging.h", + "macros.h", + "platform.h", + "types.h", + "stacktrace.h", + ], + ), +) diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl index 8907f7e6160..6404fde5504 100644 --- a/tensorflow/core/platform/default/build_config.bzl +++ b/tensorflow/core/platform/default/build_config.bzl @@ -4,7 +4,7 @@ load("@com_google_protobuf//:protobuf.bzl", "proto_gen") load("//tensorflow:tensorflow.bzl", "if_not_mobile") load("//tensorflow:tensorflow.bzl", "if_windows") load("//tensorflow:tensorflow.bzl", "if_not_windows") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") load( @@ -471,12 +471,12 @@ def tf_proto_library( # must be compiled in the 'default' platform, this is a list of all headers # mentioned in the platform/* files. def tf_platform_hdrs(files): - return native.glob(["platform/*/" + f for f in files]) + return native.glob(["*/" + f for f in files]) def tf_platform_srcs(files): - base_set = ["platform/default/" + f for f in files] - windows_set = base_set + ["platform/windows/" + f for f in files] - posix_set = base_set + ["platform/posix/" + f for f in files] + base_set = ["default/" + f for f in files] + windows_set = base_set + ["windows/" + f for f in files] + posix_set = base_set + ["posix/" + f for f in files] # Handle cases where we must also bring the posix file in. Usually, the list # of files to build on windows builds is just all the stuff in the @@ -485,7 +485,7 @@ def tf_platform_srcs(files): # file instead of making a copy in 'windows'. for f in files: if f == "error.cc": - windows_set.append("platform/posix/" + f) + windows_set.append("posix/" + f) return select({ "//tensorflow:windows": native.glob(windows_set), @@ -494,29 +494,29 @@ def tf_platform_srcs(files): def tf_additional_lib_hdrs(exclude = []): windows_hdrs = native.glob([ - "platform/default/*.h", - "platform/windows/*.h", - "platform/posix/error.h", + "default/*.h", + "windows/*.h", + "posix/error.h", ], exclude = exclude) return select({ "//tensorflow:windows": windows_hdrs, "//conditions:default": native.glob([ - "platform/default/*.h", - "platform/posix/*.h", + "default/*.h", + "posix/*.h", ], exclude = exclude), }) def tf_additional_lib_srcs(exclude = []): windows_srcs = native.glob([ - "platform/default/*.cc", - "platform/windows/*.cc", - "platform/posix/error.cc", + "default/*.cc", + "windows/*.cc", + "posix/error.cc", ], exclude = exclude) return select({ "//tensorflow:windows": windows_srcs, "//conditions:default": native.glob([ - "platform/default/*.cc", - "platform/posix/*.cc", + "default/*.cc", + "posix/*.cc", ], exclude = exclude), }) @@ -525,29 +525,24 @@ def tf_additional_monitoring_hdrs(): def tf_additional_monitoring_srcs(): return [ - "platform/default/monitoring.cc", + "default/monitoring.cc", ] def tf_additional_minimal_lib_srcs(): return [ - "platform/default/integral_types.h", - "platform/default/mutex.h", - "platform/default/mutex_data.h", + "default/integral_types.h", + "default/mutex.h", + "default/mutex_data.h", ] def tf_additional_proto_hdrs(): return [ - "platform/default/integral_types.h", - "platform/default/logging.h", + "default/integral_types.h", + "default/logging.h", ] + if_windows([ - "platform/windows/integral_types.h", + "windows/integral_types.h", ]) -def tf_additional_proto_srcs(): - return [ - "platform/protobuf.cc", - ] - def tf_additional_human_readable_json_deps(): return [] @@ -596,7 +591,7 @@ def tf_additional_cupti_wrapper_deps(): ] def tf_additional_device_tracer_srcs(): - return ["platform/default/device_tracer.cc"] + return ["default/device_tracer.cc"] def tf_additional_device_tracer_cuda_deps(): return [] @@ -627,20 +622,20 @@ def tf_additional_libdevice_deps(): return ["@local_config_cuda//cuda:cuda_headers"] def tf_additional_libdevice_srcs(): - return ["platform/default/cuda_libdevice_path.cc"] + return ["default/cuda_libdevice_path.cc"] def tf_additional_test_deps(): return [] def tf_additional_test_srcs(): return [ - "platform/default/test_benchmark.cc", + "default/test_benchmark.cc", ] + select({ "//tensorflow:windows": [ - "platform/windows/test.cc", + "windows/test.cc", ], "//conditions:default": [ - "platform/posix/test.cc", + "posix/test.cc", ], }) @@ -819,3 +814,19 @@ def tf_additional_numa_copts(): def tf_additional_rpc_deps(): return [] + +def tf_logging_absl_deps(): + return [ + "@com_google_absl//absl/base", + "@com_google_absl//absl/strings", + ] + +def tf_env_time_srcs(): + return select({ + "//tensorflow:windows": [ + "windows/env_time.cc", + ], + "//conditions:default": [ + "posix/env_time.cc", + ], + }) diff --git a/tensorflow/core/platform/default/build_config/BUILD b/tensorflow/core/platform/default/build_config/BUILD index d917d442f5c..610093a5140 100644 --- a/tensorflow/core/platform/default/build_config/BUILD +++ b/tensorflow/core/platform/default/build_config/BUILD @@ -12,7 +12,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") load("//tensorflow:tensorflow.bzl", "tf_copts") load("//tensorflow:tensorflow.bzl", "tf_cuda_library") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") load("@local_config_sycl//sycl:platform.bzl", "sycl_library_path") load("@local_config_sycl//sycl:build_defs.bzl", "if_ccpp") diff --git a/tensorflow/core/platform/platform_strings.cc b/tensorflow/core/platform/platform_strings.cc index c1852633d59..489a211ccf7 100644 --- a/tensorflow/core/platform/platform_strings.cc +++ b/tensorflow/core/platform/platform_strings.cc @@ -15,14 +15,12 @@ limitations under the License. #include "tensorflow/core/platform/platform_strings.h" +#include #include #include - #include #include -#include "tensorflow/core/lib/core/status.h" - namespace tensorflow { int GetPlatformStrings(const std::string& path, diff --git a/tensorflow/core/profiler/BUILD b/tensorflow/core/profiler/BUILD index 470472e34ce..73b938eb639 100644 --- a/tensorflow/core/profiler/BUILD +++ b/tensorflow/core/profiler/BUILD @@ -1,5 +1,5 @@ load("//tensorflow:tensorflow.bzl", "tf_cc_binary") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library", "tf_additional_all_protos") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library") # Placeholder for Google-internal load statements. package( diff --git a/tensorflow/core/profiler/lib/BUILD b/tensorflow/core/profiler/lib/BUILD index d4dd151e86b..81d33078e69 100644 --- a/tensorflow/core/profiler/lib/BUILD +++ b/tensorflow/core/profiler/lib/BUILD @@ -3,7 +3,7 @@ load( "tf_cuda_library", ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_profiler_lib_deps", ) diff --git a/tensorflow/core/protobuf/tpu/BUILD b/tensorflow/core/protobuf/tpu/BUILD index 33db44a7020..98aa1b8e5cf 100644 --- a/tensorflow/core/protobuf/tpu/BUILD +++ b/tensorflow/core/protobuf/tpu/BUILD @@ -1,5 +1,5 @@ load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library", "tf_proto_library_py", diff --git a/tensorflow/examples/adding_an_op/BUILD b/tensorflow/examples/adding_an_op/BUILD index 9feb6eb0ffd..47dc19cf95c 100644 --- a/tensorflow/examples/adding_an_op/BUILD +++ b/tensorflow/examples/adding_an_op/BUILD @@ -2,7 +2,7 @@ # Code examples referenced by adding_an_op load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "tf_cuda_tests_tags", "tf_exec_compatible_with", ) diff --git a/tensorflow/lite/toco/BUILD b/tensorflow/lite/toco/BUILD index 43714fcf902..ea2f5a9b1f1 100644 --- a/tensorflow/lite/toco/BUILD +++ b/tensorflow/lite/toco/BUILD @@ -1,5 +1,5 @@ load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_cc", "tf_proto_library_py", ) diff --git a/tensorflow/lite/tools/evaluation/proto/BUILD b/tensorflow/lite/tools/evaluation/proto/BUILD index fe4e028ab5c..8c265ff5c70 100644 --- a/tensorflow/lite/tools/evaluation/proto/BUILD +++ b/tensorflow/lite/tools/evaluation/proto/BUILD @@ -19,7 +19,7 @@ package( ) load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_py", ) diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index b78e9319bde..0d0da3c3c7a 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -23,8 +23,8 @@ load("//tensorflow:tensorflow.bzl", "if_mlir", "if_not_v2", "if_not_windows", "p load("//tensorflow:tensorflow.bzl", "tf_py_wrap_cc") load("//tensorflow:tensorflow.bzl", "cuda_py_test") load("//tensorflow:tensorflow.bzl", "cuda_py_tests") -load("//tensorflow/core:platform/default/build_config.bzl", "pyx_library", "tf_additional_all_protos", "tf_additional_cupti_test_flags", "tf_additional_lib_deps", "tf_proto_library", "tf_proto_library_py", "tf_protos_grappler") # @unused -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static", "tf_additional_gdr_deps", "tf_additional_mpi_deps", "tf_additional_plugin_deps", "tf_additional_verbs_deps") +load("//tensorflow/core/platform:default/build_config.bzl", "pyx_library", "tf_additional_all_protos", "tf_additional_cupti_test_flags", "tf_additional_lib_deps", "tf_proto_library", "tf_proto_library_py", "tf_protos_grappler") # @unused +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static", "tf_additional_gdr_deps", "tf_additional_mpi_deps", "tf_additional_plugin_deps", "tf_additional_verbs_deps") load("//tensorflow/python:build_defs.bzl", "tf_gen_op_wrapper_private_py") load( "//third_party/ngraph:build_defs.bzl", diff --git a/tensorflow/python/distribute/BUILD b/tensorflow/python/distribute/BUILD index 78cac7081db..021bf23300d 100644 --- a/tensorflow/python/distribute/BUILD +++ b/tensorflow/python/distribute/BUILD @@ -1,7 +1,7 @@ load("//tensorflow:tensorflow.bzl", "py_test", "tf_py_test") load("//tensorflow:tensorflow.bzl", "cuda_py_test") load("//tensorflow/compiler/tests:build_defs.bzl", "tf_xla_py_test") -load("//tensorflow/core:platform/default/distribute.bzl", "distribute_py_test") +load("//tensorflow/core/platform:default/distribute.bzl", "distribute_py_test") package( default_visibility = ["//tensorflow:internal"], diff --git a/tensorflow/python/distribute/cluster_resolver/BUILD b/tensorflow/python/distribute/cluster_resolver/BUILD index 44a966142fd..48623337391 100644 --- a/tensorflow/python/distribute/cluster_resolver/BUILD +++ b/tensorflow/python/distribute/cluster_resolver/BUILD @@ -2,7 +2,7 @@ load("//tensorflow:tensorflow.bzl", "tf_py_test") load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_additional_rpc_deps", ) diff --git a/tensorflow/python/keras/BUILD b/tensorflow/python/keras/BUILD index b8583b64ab5..443263ffb48 100755 --- a/tensorflow/python/keras/BUILD +++ b/tensorflow/python/keras/BUILD @@ -3,7 +3,6 @@ load("//tensorflow:tensorflow.bzl", "tf_py_test") load("//tensorflow:tensorflow.bzl", "cuda_py_test") -load("//tensorflow/core:platform/default/distribute.bzl", "distribute_py_test") package( default_visibility = ["//visibility:public"], diff --git a/tensorflow/python/keras/distribute/BUILD b/tensorflow/python/keras/distribute/BUILD index f2de27efbc1..888bc2e2b47 100644 --- a/tensorflow/python/keras/distribute/BUILD +++ b/tensorflow/python/keras/distribute/BUILD @@ -2,7 +2,7 @@ # keras/distribute package is intended to serve as the centralized place for things # related to dist-strat used by Keras.. -load("//tensorflow/core:platform/default/distribute.bzl", "distribute_py_test") +load("//tensorflow/core/platform:default/distribute.bzl", "distribute_py_test") load("//tensorflow:tensorflow.bzl", "cuda_py_test") package( diff --git a/tensorflow/python/kernel_tests/proto/BUILD b/tensorflow/python/kernel_tests/proto/BUILD index 5a0f6a9efef..ff86609ed55 100644 --- a/tensorflow/python/kernel_tests/proto/BUILD +++ b/tensorflow/python/kernel_tests/proto/BUILD @@ -2,9 +2,8 @@ load("//tensorflow:tensorflow.bzl", "tf_py_test") load("//tensorflow:tensorflow.bzl", "tf_cc_shared_object") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_additional_all_protos") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library") # Placeholder for Google-internal load statements. package( diff --git a/tensorflow/python/tpu/BUILD b/tensorflow/python/tpu/BUILD index bdfb8b58428..703dc7c7573 100644 --- a/tensorflow/python/tpu/BUILD +++ b/tensorflow/python/tpu/BUILD @@ -8,7 +8,7 @@ load( "tf_py_test", ) load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") # Do not add anymore paths here. You do not need to be in the visibility list # to use TPU symbols. They are accessible from tf.contrib.tpu in TF 1.x and diff --git a/tensorflow/stream_executor/BUILD b/tensorflow/stream_executor/BUILD index 654e84b2bc1..817a43cec39 100644 --- a/tensorflow/stream_executor/BUILD +++ b/tensorflow/stream_executor/BUILD @@ -5,8 +5,8 @@ # do not link against restricted binary blobs. load("//tensorflow:tensorflow.bzl", "tf_cc_test") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") load("//tensorflow/stream_executor:build_defs.bzl", "stream_executor_friends") package( diff --git a/tensorflow/stream_executor/cuda/BUILD b/tensorflow/stream_executor/cuda/BUILD index eec6195561b..48e9665ef05 100644 --- a/tensorflow/stream_executor/cuda/BUILD +++ b/tensorflow/stream_executor/cuda/BUILD @@ -11,11 +11,11 @@ load( ) load("//tensorflow:tensorflow.bzl", "tf_copts") load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_static", "tf_cuda_tests_tags", ) diff --git a/tensorflow/stream_executor/gpu/BUILD b/tensorflow/stream_executor/gpu/BUILD index 1981490f7ea..cd598b486dc 100644 --- a/tensorflow/stream_executor/gpu/BUILD +++ b/tensorflow/stream_executor/gpu/BUILD @@ -6,7 +6,7 @@ load( "if_gpu_is_configured", ) load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") diff --git a/tensorflow/stream_executor/platform/BUILD b/tensorflow/stream_executor/platform/BUILD index f5071d1eb9d..f9540db0103 100644 --- a/tensorflow/stream_executor/platform/BUILD +++ b/tensorflow/stream_executor/platform/BUILD @@ -1,5 +1,4 @@ load("//tensorflow/stream_executor:build_defs.bzl", "stream_executor_friends") -load("//tensorflow/core:platform/default/build_config.bzl", "tf_platform_hdrs") package( default_visibility = [":friends"], diff --git a/tensorflow/stream_executor/platform/default/BUILD b/tensorflow/stream_executor/platform/default/BUILD index e039b5e4f57..51170e4531d 100644 --- a/tensorflow/stream_executor/platform/default/BUILD +++ b/tensorflow/stream_executor/platform/default/BUILD @@ -2,7 +2,7 @@ licenses(["notice"]) # Apache 2.0 package(default_visibility = ["//tensorflow/stream_executor:__subpackages__"]) -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") load("//tensorflow:tensorflow.bzl", "tf_copts") cc_library( diff --git a/tensorflow/stream_executor/rocm/BUILD b/tensorflow/stream_executor/rocm/BUILD index 71139c01e23..008de9e918d 100644 --- a/tensorflow/stream_executor/rocm/BUILD +++ b/tensorflow/stream_executor/rocm/BUILD @@ -8,7 +8,7 @@ load( ) load("//tensorflow:tensorflow.bzl", "tf_copts") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load("//tensorflow/core:platform/default/build_config_root.bzl", "if_static") +load("//tensorflow/core/platform:default/build_config_root.bzl", "if_static") package( default_visibility = [":friends"], diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index ce60a18b872..80d8f5428ae 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -3,7 +3,7 @@ # Return the options to use for a C++ library or binary build. # Uses the ":optmode" config_setting to pick the options. load( - "//tensorflow/core:platform/default/build_config_root.bzl", + "//tensorflow/core/platform:default/build_config_root.bzl", "if_dynamic_kernels", "if_static", "tf_additional_grpc_deps_py", @@ -18,7 +18,7 @@ load( "if_tensorrt", ) load( - "//tensorflow/core:platform/default/cuda_build_defs.bzl", + "//tensorflow/core/platform:default/cuda_build_defs.bzl", "if_cuda_is_configured", ) load( @@ -80,7 +80,7 @@ def if_cuda_is_configured_compat(x): # i.e. "common_runtime/direct_session_test.cc" becomes # "common_runtime_direct_session_test" def src_to_test_name(src): - return src.replace("/", "_").split(".")[0] + return src.replace("/", "_").replace(":", "_").split(".")[0] def full_path(relative_paths): return [native.package_name() + "/" + relative for relative in relative_paths] diff --git a/tensorflow/tools/api/lib/BUILD b/tensorflow/tools/api/lib/BUILD index 4c2c9b876fa..75cb9338d4a 100644 --- a/tensorflow/tools/api/lib/BUILD +++ b/tensorflow/tools/api/lib/BUILD @@ -1,7 +1,7 @@ # Helper libraries for TensorFlow API compatibility test. load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library", ) diff --git a/tensorflow/tools/lib_package/BUILD b/tensorflow/tools/lib_package/BUILD index b8ebdc81053..75e01e3803b 100644 --- a/tensorflow/tools/lib_package/BUILD +++ b/tensorflow/tools/lib_package/BUILD @@ -8,7 +8,7 @@ load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") load("@local_config_syslibs//:build_defs.bzl", "if_not_system_lib") load("//tensorflow:tensorflow.bzl", "VERSION", "VERSION_MAJOR", "if_macos") -load("//tensorflow/core:platform/default/build_config_root.bzl", "tf_additional_license_deps") +load("//tensorflow/core/platform:default/build_config_root.bzl", "tf_additional_license_deps") load("//third_party/mkl:build_defs.bzl", "if_mkl") genrule( diff --git a/tensorflow/tools/pip_package/BUILD b/tensorflow/tools/pip_package/BUILD index e9a017acc90..3020a13a42d 100644 --- a/tensorflow/tools/pip_package/BUILD +++ b/tensorflow/tools/pip_package/BUILD @@ -13,7 +13,7 @@ load("//third_party/mkl:build_defs.bzl", "if_mkl", "if_mkl_ml") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") load("@local_config_syslibs//:build_defs.bzl", "if_not_system_lib") -load("//tensorflow/core:platform/default/build_config_root.bzl", "tf_additional_license_deps") +load("//tensorflow/core/platform:default/build_config_root.bzl", "tf_additional_license_deps") load( "//third_party/ngraph:build_defs.bzl", "if_ngraph", diff --git a/tensorflow/tools/proto_text/BUILD b/tensorflow/tools/proto_text/BUILD index 4e5db0ce58d..893a7f3e350 100644 --- a/tensorflow/tools/proto_text/BUILD +++ b/tensorflow/tools/proto_text/BUILD @@ -17,7 +17,7 @@ load( # For platform specific build config load( - "//tensorflow/core:platform/default/build_config.bzl", + "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_cc", )