[go: nahoru, domu]

Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 650824311
  • Loading branch information
tensorflower-gardener committed Jul 11, 2024
1 parent bc6210b commit 53a3733
Show file tree
Hide file tree
Showing 28 changed files with 87 additions and 40 deletions.
2 changes: 2 additions & 0 deletions tensorflow/compiler/mlir/tfrt/test_opkernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ limitations under the License.
#include "tensorflow/core/framework/common_shape_fns.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/types.h"

namespace tensorflow {
namespace tf_mlrt {
Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/nccl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ cc_library(
[
":loose_headers",
"//tensorflow/core:framework",
"//tensorflow/core/protobuf:for_core_protos_cc",
] + if_nccl([
":nccl_lib",
"@com_google_absl//absl/memory",
Expand Down
3 changes: 2 additions & 1 deletion tensorflow/core/nccl/collective_communicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ limitations under the License.

#include "tensorflow/core/nccl/collective_communicator.h"

#include "tensorflow/core/framework/cancellation.h"
#include "tensorflow/core/framework/collective.h"
#include "tensorflow/core/protobuf/config.pb.h"

#if TENSORFLOW_USE_NCCL && (GOOGLE_CUDA || TENSORFLOW_USE_ROCM)

Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/nccl/collective_communicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
#define TENSORFLOW_CORE_NCCL_COLLECTIVE_COMMUNICATOR_H_

#include "tensorflow/core/framework/collective.h"
#include "tensorflow/core/protobuf/config.pb.h"

namespace tensorflow {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cc_library(
"notap",
],
deps = [
"//tensorflow/lite/c:c_api_types",
"//tensorflow/lite/delegates/hexagon:hexagon_delegate",
"//tensorflow/lite/java/jni",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

#include <sstream>

#include "tensorflow/lite/c/c_api_types.h"
#include "tensorflow/lite/delegates/hexagon/hexagon_delegate.h"

extern "C" {
Expand Down
62 changes: 42 additions & 20 deletions tensorflow/python/util/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ cc_library(
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"@com_google_absl//absl/log",
],
alwayslink = 1,
)
Expand All @@ -72,12 +73,7 @@ tf_python_pybind_extension(
"_pywrap_tfprof.pyi",
],
deps = [
"//tensorflow/core:framework_headers_lib",
"//tensorflow/core:lib_headers_for_pybind",
"//tensorflow/core/profiler/internal:print_model_analysis_hdr",
"//third_party/python_runtime:headers",
"@com_google_absl//absl/strings",
"@eigen_archive//:eigen3",
"@pybind11",
],
)
Expand All @@ -92,7 +88,7 @@ tf_python_pybind_extension(
],
deps = [
"//tensorflow/core:framework",
"//tensorflow/core/platform:platform_port",
"//tensorflow/core:protos_all_cc",
"//tensorflow/python/lib/core:pybind11_lib",
"//third_party/python_runtime:headers",
"@pybind11",
Expand Down Expand Up @@ -122,7 +118,6 @@ cc_library(
":cpp_python_util",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core/platform:logging",
"//tensorflow/core/platform:stringpiece",
"//tensorflow/python/lib/core:safe_pyobject_ptr",
"//third_party/python_runtime:headers",
Expand Down Expand Up @@ -156,12 +151,8 @@ tf_python_pybind_extension(
"_pywrap_stat_summarizer.pyi",
],
deps = [
"//tensorflow/core:framework_headers_lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/util:stat_summarizer",
"//third_party/python_runtime:headers",
"@com_google_absl//absl/memory",
"@eigen_archive//:eigen3",
"@local_xla//xla/tsl/util:stats_calculator_portable",
"@pybind11",
],
Expand Down Expand Up @@ -221,11 +212,15 @@ tf_python_pybind_extension(
"_pywrap_transform_graph.pyi",
],
deps = [
"//tensorflow/core:framework_headers_lib",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:lib_headers_for_pybind",
"//tensorflow/core:lib_proto_parsing",
"//tensorflow/core:portable_gif_internal",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/platform:errors",
"//tensorflow/core/platform:status",
"//tensorflow/python/lib/core:pybind11_status",
"//third_party/python_runtime:headers",
"@pybind11",
],
)
Expand All @@ -247,16 +242,20 @@ tf_python_pybind_extension(
"_pywrap_checkpoint_reader.pyi",
],
deps = [
"//tensorflow/compiler/tf2tensorrt:common_utils",
"//tensorflow/compiler/tf2tensorrt:trt_parameters",
"//tensorflow/core:framework",
"//tensorflow/core:lib_headers_for_pybind",
"//tensorflow/core:op_gen_lib",
"//tensorflow/core:portable_gif_internal",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/util/tensor_bundle:tensor_bundle_headers_lib",
"//tensorflow/core/platform:status",
"//tensorflow/core/platform:statusor",
"//tensorflow/core/util/tensor_bundle",
"//tensorflow/python/lib/core:pybind11_lib",
"//tensorflow/python/lib/core:pybind11_status",
"//tensorflow/python/lib/core:safe_pyobject_ptr",
"//third_party/py/numpy:headers",
"//third_party/python_runtime:headers",
"@com_google_absl//absl/strings",
"@pybind11",
],
)
Expand All @@ -266,7 +265,6 @@ cc_library(
srcs = ["util.cc"],
hdrs = ["util.h"],
deps = [
"//tensorflow/c:safe_ptr",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/python/lib/core:safe_pyobject_ptr",
Expand Down Expand Up @@ -440,14 +438,31 @@ tf_python_pybind_extension(
],
deps = [
"//tensorflow/c:pywrap_required_hdrs",
"//tensorflow/compiler/tf2tensorrt:common_utils",
"//tensorflow/compiler/tf2tensorrt:trt_parameters",
"//tensorflow/core:core_cpu_base",
"//tensorflow/core:framework",
"//tensorflow/core:framework_lite",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/common_runtime:core_cpu_headers_lib",
"//tensorflow/core/framework:pywrap_required_hdrs",
"//tensorflow/core/platform:path",
"//tensorflow/core/platform:stack_frame",
"//tensorflow/core/platform:status",
"//tensorflow/core/platform:statusor",
"//tensorflow/core/protobuf:for_core_protos_cc",
"//tensorflow/core/util:managed_stack_trace",
"//third_party/python_runtime:headers", # buildcleaner: keep
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:span",
"@local_tsl//tsl/platform:fingerprint",
"@local_tsl//tsl/platform:mutex",
"@pybind11",
"@pybind11_abseil//pybind11_abseil:absl_casters",
"@pybind11_abseil//pybind11_abseil:status_casters",
Expand All @@ -471,12 +486,13 @@ cc_library(
srcs = ["stack_trace.cc"],
hdrs = ["stack_trace.h"],
deps = [
"//tensorflow/core/platform:status",
"//tensorflow/core/platform:stack_frame",
"//tensorflow/core/util:managed_stack_trace",
"//third_party/python_runtime:headers", # buildcleaner: keep
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/log:check",
"@local_tsl//tsl/platform:fingerprint",
],
)
Expand All @@ -491,6 +507,7 @@ cc_library(
"//tensorflow/python/lib/core:py_util",
"//tensorflow/python/lib/core:safe_pyobject_ptr",
"//third_party/python_runtime:headers", # buildcleaner: keep
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
Expand All @@ -500,6 +517,12 @@ cc_library(
cc_library(
name = "function_parameter_canonicalizer_hdrs",
textual_hdrs = ["function_parameter_canonicalizer.h"],
deps = [
"//tensorflow/python/lib/core:safe_pyobject_ptr",
"//third_party/python_runtime:headers",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/types:span",
],
)

tf_python_pybind_extension(
Expand All @@ -517,6 +540,7 @@ tf_python_pybind_extension(
deps = [
"//tensorflow/core:lib",
"//third_party/python_runtime:headers", # buildcleaner: keep
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/types:span",
"@pybind11",
],
Expand Down Expand Up @@ -1086,7 +1110,6 @@ tf_python_pybind_extension(
],
deps = [
"//tensorflow/core/platform:logging",
"//third_party/python_runtime:headers",
"@com_google_absl//absl/container:flat_hash_map",
"@pybind11",
],
Expand Down Expand Up @@ -1205,7 +1228,6 @@ tf_python_pybind_extension(
"pywrap_xla_ops.pyi",
],
deps = [
"//tensorflow/python/lib/core:pybind11_lib",
"@com_google_absl//absl/status:statusor",
"@pybind11",
"@pybind11_abseil//pybind11_abseil:absl_casters",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/python/util/fast_module_type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ limitations under the License.
#include "pybind11/pybind11.h" // from @pybind11
// clang-format on

#include "Python.h"
#include "absl/container/flat_hash_map.h"
#include "tensorflow/core/platform/logging.h"

Expand Down
2 changes: 2 additions & 0 deletions tensorflow/python/util/function_parameter_canonicalizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ limitations under the License.

#include "tensorflow/python/util/function_parameter_canonicalizer.h"

#include "absl/base/attributes.h"
#include "absl/container/flat_hash_set.h"
#include "absl/strings/str_cat.h"
#include "absl/types/span.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/python/lib/core/py_util.h"
Expand Down
1 change: 1 addition & 0 deletions tensorflow/python/util/function_parameter_canonicalizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ limitations under the License.

#include <vector>

#include "absl/base/attributes.h"
#include "absl/types/span.h"
#include "tensorflow/python/lib/core/safe_pyobject_ptr.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ limitations under the License.
#include "pybind11/pytypes.h" // from @pybind11
#include "pybind11/stl.h" // from @pybind11
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/python/lib/core/safe_pyobject_ptr.h"
#include "tensorflow/python/util/function_parameter_canonicalizer.h"

namespace py = pybind11;
Expand Down
4 changes: 3 additions & 1 deletion tensorflow/python/util/kernel_registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/python/util/kernel_registry.h"

#include "absl/log/log.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/util/device_name_utils.h"

namespace tensorflow {
Expand Down
1 change: 0 additions & 1 deletion tensorflow/python/util/nest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
#include <utility>

#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/stringpiece.h"
#include "tensorflow/python/lib/core/safe_pyobject_ptr.h"
#include "tensorflow/python/util/util.h"
Expand Down
8 changes: 4 additions & 4 deletions tensorflow/python/util/py_checkpoint_reader_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ limitations under the License.
==============================================================================*/

// Disallow Numpy 1.7 deprecated symbols.
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/platform/types.h"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "pybind11/chrono.h" // from @pybind11
#include "pybind11/complex.h" // from @pybind11
#include "pybind11/functional.h" // from @pybind11
Expand All @@ -26,10 +29,7 @@ limitations under the License.
#include "tensorflow/c/checkpoint_reader.h"
#include "tensorflow/c/safe_ptr.h"
#include "tensorflow/c/tf_status.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/python/lib/core/ndarray_tensor.h"
#include "tensorflow/python/lib/core/py_exception_registry.h"
#include "tensorflow/python/lib/core/pybind11_lib.h"
#include "tensorflow/python/lib/core/pybind11_status.h"
#include "tensorflow/python/lib/core/safe_pyobject_ptr.h"
Expand Down
5 changes: 4 additions & 1 deletion tensorflow/python/util/stack_trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ limitations under the License.
#include <utility>
#include <vector>

#include "absl/base/attributes.h"
#include "absl/container/flat_hash_map.h"
#include "tensorflow/core/platform/status.h"
#include "absl/log/check.h"
#include "tensorflow/core/platform/stack_frame.h"
#include "tensorflow/core/util/managed_stack_trace.h"

namespace {

Expand Down
1 change: 1 addition & 0 deletions tensorflow/python/util/stack_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ limitations under the License.

#include "absl/base/attributes.h"
#include "absl/container/inlined_vector.h"
#include "tensorflow/core/platform/stack_frame.h"
#include "tensorflow/core/util/managed_stack_trace.h"
#include "tsl/platform/fingerprint.h"

Expand Down
2 changes: 0 additions & 2 deletions tensorflow/python/util/stat_summarizer_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ limitations under the License.

#include <memory>

#include "absl/memory/memory.h"
#include "pybind11/pybind11.h" // from @pybind11
#include "pybind11/pytypes.h" // from @pybind11
#include "xla/tsl/util/stat_summarizer_options.h"
#include "xla/tsl/util/stats_calculator.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/step_stats.pb.h"
#include "tensorflow/core/util/stat_summarizer.h"
Expand Down
1 change: 1 addition & 0 deletions tensorflow/python/util/tf2xla_opset_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.
#include <string>
#include <vector>

#include "absl/status/statusor.h"
#include "pybind11/pybind11.h" // from @pybind11
#include "pybind11/pytypes.h" // from @pybind11
#include "pybind11/stl.h" // from @pybind11
Expand Down
Loading

0 comments on commit 53a3733

Please sign in to comment.