From 6abb31a6ea36fd34bc222e0b8504c86f37a1d0a6 Mon Sep 17 00:00:00 2001 From: David Dunleavy Date: Fri, 10 Jan 2025 12:53:00 -0800 Subject: [PATCH] Update users of TSL headers and targets to new location in XLA Updating: - `env.h` - `env_time.h` - `errors.h` - `file_statistics.h` - `file_system.h` - `file_system_helper.h` - `logging.h` - `macros.h` - `status.h` - `status_matchers.h` - `status_to_from_proto.h` - `statusor.h` - `test.h` - `test_benchmark.h` - `threadpool.h` - `threadpool_async_executor.h` - `threadpool_interface.h` - `threadpool_options.h` - `types.h` and associated targets. PiperOrigin-RevId: 714144759 --- xla/stream_executor/tpu/BUILD | 54 +++++++++---------- xla/stream_executor/tpu/c_api_conversions.cc | 2 +- xla/stream_executor/tpu/noncopyable_buffer.h | 2 +- xla/stream_executor/tpu/proto_helper.cc | 2 +- xla/stream_executor/tpu/proto_helper.h | 2 +- xla/stream_executor/tpu/tpu_executable.cc | 4 +- .../tpu/tpu_executable_interface.cc | 6 +-- xla/stream_executor/tpu/tpu_executor.cc | 4 +- xla/stream_executor/tpu/tpu_executor.h | 4 +- .../tpu/tpu_initialize_util.cc | 2 +- xla/stream_executor/tpu/tpu_node_context.h | 2 +- .../tpu/tpu_on_demand_compiler.cc | 2 +- xla/stream_executor/tpu/tpu_op_executable.h | 2 +- xla/stream_executor/tpu/tpu_platform.cc | 4 +- xla/stream_executor/tpu/tpu_platform.h | 2 +- .../tpu/tpu_platform_interface.cc | 4 +- xla/stream_executor/tpu/tpu_topology.h | 2 +- .../tpu/tpu_transfer_manager.cc | 2 +- xla/stream_executor/tpu/tsl_status_helper.h | 2 +- 19 files changed, 52 insertions(+), 52 deletions(-) diff --git a/xla/stream_executor/tpu/BUILD b/xla/stream_executor/tpu/BUILD index fcd72ef1796cf..282e96ca2d9d4 100644 --- a/xla/stream_executor/tpu/BUILD +++ b/xla/stream_executor/tpu/BUILD @@ -76,11 +76,11 @@ cc_library( "//xla/service:shaped_buffer", "//xla/stream_executor:device_memory", "//xla/stream_executor:device_memory_allocator", + "//xla/tsl/platform:logging", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/types:span", - "@tsl//tsl/platform:logging", ], ) @@ -118,9 +118,9 @@ cc_library( hdrs = ["noncopyable_buffer.h"], visibility = ["//visibility:public"], deps = [ + "//xla/tsl/platform:logging", "@com_google_absl//absl/functional:function_ref", "@com_google_absl//absl/types:span", - "@tsl//tsl/platform:logging", "@tsl//tsl/platform:platform_port", ], ) @@ -132,8 +132,8 @@ cc_library( ":c_api_decl", ":tpu_executor_api", ":tpu_executor_c_api_hdrs", + "//xla/tsl/platform:status", "@com_google_absl//absl/status", - "@tsl//tsl/platform:status", ], ) @@ -144,8 +144,8 @@ cc_library( ":c_api_decl", "//xla/tsl/c:tsl_status", "//xla/tsl/c:tsl_status_helper", + "//xla/tsl/platform:status", "@com_google_absl//absl/status", - "@tsl//tsl/platform:status", ], ) @@ -155,8 +155,8 @@ cc_library( hdrs = ["proto_helper.h"], deps = [ ":c_api_decl", + "//xla/tsl/platform:logging", "@com_google_absl//absl/log:check", - "@tsl//tsl/platform:logging", ], ) @@ -212,6 +212,8 @@ cc_library( "//xla/stream_executor:stream", "//xla/stream_executor:stream_executor_h", "//xla/stream_executor/platform:initialize", + "//xla/tsl/platform:logging", + "//xla/tsl/platform:types", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/log", @@ -221,8 +223,6 @@ cc_library( "@com_google_absl//absl/synchronization", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:logging", - "@tsl//tsl/platform:types", ], alwayslink = True, ) @@ -246,13 +246,13 @@ cc_library( "//xla/stream_executor:platform", "//xla/stream_executor:stream", "//xla/stream_executor:stream_executor_h", + "//xla/tsl/platform:logging", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/synchronization", - "@tsl//tsl/platform:logging", ], ) @@ -284,6 +284,8 @@ cc_library( "//xla/stream_executor:stream_common", "//xla/stream_executor:stream_executor_common", "//xla/stream_executor:stream_executor_h", + "//xla/tsl/platform:logging", + "//xla/tsl/platform:types", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/log", @@ -293,8 +295,6 @@ cc_library( "@com_google_absl//absl/synchronization", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:logging", - "@tsl//tsl/platform:types", ], ) @@ -340,6 +340,10 @@ cc_library( "//xla/stream_executor:stream", "//xla/stream_executor:stream_executor_h", "//xla/tsl/c:tsl_status_internal", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:logging", + "//xla/tsl/platform:status", + "//xla/tsl/platform:types", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/functional:any_invocable", @@ -351,10 +355,6 @@ cc_library( "@com_google_absl//absl/synchronization", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:errors", - "@tsl//tsl/platform:logging", - "@tsl//tsl/platform:status", - "@tsl//tsl/platform:types", ], ) @@ -392,10 +392,10 @@ cc_library( "//xla/service:backend", "//xla/service:stream_pool", "//xla/stream_executor:device_memory_allocator", + "//xla/tsl/platform:macros", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", - "@tsl//tsl/platform:macros", ], ) @@ -464,13 +464,13 @@ cc_library( "//xla/stream_executor:platform", "//xla/stream_executor:stream", "//xla/stream_executor:stream_executor_h", + "//xla/tsl/platform:logging", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:logging", ], ) @@ -492,13 +492,13 @@ cc_library( "//xla/hlo/ir:hlo", "//xla/service:executable", "//xla/stream_executor:device_memory", + "//xla/tsl/platform:macros", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:macros", ], ) @@ -513,14 +513,14 @@ cc_library( "//xla/stream_executor:event", "//xla/stream_executor:platform", "//xla/stream_executor:platform_manager", + "//xla/tsl/platform:env", + "//xla/tsl/platform:logging", "//xla/tsl/protobuf:error_codes_proto_impl_cc", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/synchronization", - "@tsl//tsl/platform:env", - "@tsl//tsl/platform:logging", ], ) @@ -547,12 +547,12 @@ cc_library( ], visibility = ["//visibility:public"], deps = [ + "//xla/tsl/platform:logging", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", - "@tsl//tsl/platform:logging", ], ) @@ -579,9 +579,9 @@ cc_library( "//xla/service:hlo_cost_analysis", "//xla/service:hlo_proto_cc", "//xla/stream_executor:platform", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/status:statusor", - "@tsl//tsl/platform:statusor", ], alwayslink = True, ) @@ -617,6 +617,9 @@ cc_library( "//xla/stream_executor:device_memory_allocator", "//xla/stream_executor:stream", "//xla/stream_executor:stream_executor_h", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:logging", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", @@ -624,9 +627,6 @@ cc_library( "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", - "@tsl//tsl/platform:errors", - "@tsl//tsl/platform:logging", - "@tsl//tsl/platform:statusor", ], ) @@ -650,6 +650,8 @@ cc_library( "//xla/service:shaped_buffer", "//xla/stream_executor:device_memory", "//xla/stream_executor:stream", + "//xla/tsl/platform:logging", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/log", @@ -658,8 +660,6 @@ cc_library( "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", - "@tsl//tsl/platform:logging", - "@tsl//tsl/platform:statusor", ], ) @@ -690,6 +690,6 @@ cc_library( deps = [ ":c_api_decl", ":tpu_executor_api", - "@tsl//tsl/platform:types", + "//xla/tsl/platform:types", ], ) diff --git a/xla/stream_executor/tpu/c_api_conversions.cc b/xla/stream_executor/tpu/c_api_conversions.cc index 9cdee13ba01a0..123388f1d636f 100644 --- a/xla/stream_executor/tpu/c_api_conversions.cc +++ b/xla/stream_executor/tpu/c_api_conversions.cc @@ -48,10 +48,10 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_executor_api.h" #include "xla/stream_executor/tpu/tpu_executor_c_api.h" #include "xla/stream_executor/tpu/tpu_ops_c_api.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep #include "xla/util.h" #include "xla/xla.pb.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep namespace ApiConverter { diff --git a/xla/stream_executor/tpu/noncopyable_buffer.h b/xla/stream_executor/tpu/noncopyable_buffer.h index f9c86d59a5b75..2c3f3f3017489 100644 --- a/xla/stream_executor/tpu/noncopyable_buffer.h +++ b/xla/stream_executor/tpu/noncopyable_buffer.h @@ -29,7 +29,7 @@ limitations under the License. #include "absl/functional/function_ref.h" #include "absl/types/span.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep #include "tsl/platform/mem.h" namespace tensorflow { diff --git a/xla/stream_executor/tpu/proto_helper.cc b/xla/stream_executor/tpu/proto_helper.cc index 01b2df7250770..a7f05a99b3d77 100644 --- a/xla/stream_executor/tpu/proto_helper.cc +++ b/xla/stream_executor/tpu/proto_helper.cc @@ -17,7 +17,7 @@ limitations under the License. #include "absl/log/check.h" #include "xla/stream_executor/tpu/c_api_decl.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep extern "C" { diff --git a/xla/stream_executor/tpu/proto_helper.h b/xla/stream_executor/tpu/proto_helper.h index e1c9cab24b540..2e6faff29b25f 100644 --- a/xla/stream_executor/tpu/proto_helper.h +++ b/xla/stream_executor/tpu/proto_helper.h @@ -20,7 +20,7 @@ limitations under the License. #include "absl/log/check.h" #include "xla/stream_executor/tpu/c_api_decl.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep extern "C" { diff --git a/xla/stream_executor/tpu/tpu_executable.cc b/xla/stream_executor/tpu/tpu_executable.cc index a59ab5d38f15e..8c94ef64a2a6b 100644 --- a/xla/stream_executor/tpu/tpu_executable.cc +++ b/xla/stream_executor/tpu/tpu_executable.cc @@ -38,9 +38,9 @@ limitations under the License. #include "xla/stream_executor/tpu/status_helper.h" #include "xla/stream_executor/tpu/tpu_executor_api.h" #include "xla/stream_executor/tpu/tpu_stream.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/statusor.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep -#include "tsl/platform/statusor.h" namespace ApiConverter { diff --git a/xla/stream_executor/tpu/tpu_executable_interface.cc b/xla/stream_executor/tpu/tpu_executable_interface.cc index 7cdc0b7a2b923..93e9d0f7d23c0 100644 --- a/xla/stream_executor/tpu/tpu_executable_interface.cc +++ b/xla/stream_executor/tpu/tpu_executable_interface.cc @@ -41,10 +41,10 @@ limitations under the License. #include "xla/stream_executor/device_memory.h" #include "xla/stream_executor/device_memory_allocator.h" #include "xla/stream_executor/stream.h" +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/statusor.h" #include "xla/util.h" -#include "tsl/platform/errors.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep -#include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/stream_executor/tpu/tpu_executor.cc b/xla/stream_executor/tpu/tpu_executor.cc index 4201c667869ac..77f666ce163e5 100644 --- a/xla/stream_executor/tpu/tpu_executor.cc +++ b/xla/stream_executor/tpu/tpu_executor.cc @@ -40,8 +40,8 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_stream.h" #include "xla/stream_executor/tpu/tpu_topology.h" #include "xla/tsl/c/tsl_status.h" -#include "tsl/platform/errors.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep namespace stream_executor { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_executor.h b/xla/stream_executor/tpu/tpu_executor.h index 31cad08ef2fdb..af262e7d345f2 100644 --- a/xla/stream_executor/tpu/tpu_executor.h +++ b/xla/stream_executor/tpu/tpu_executor.h @@ -43,9 +43,9 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_platform.h" #include "xla/stream_executor/tpu/tpu_platform_interface.h" #include "xla/stream_executor/tpu/tpu_topology.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/types.h" #include "tsl/platform/casts.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep -#include "tsl/platform/types.h" namespace stream_executor { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_initialize_util.cc b/xla/stream_executor/tpu/tpu_initialize_util.cc index cb52adbf7534e..b70e7eb494f63 100644 --- a/xla/stream_executor/tpu/tpu_initialize_util.cc +++ b/xla/stream_executor/tpu/tpu_initialize_util.cc @@ -39,7 +39,7 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/synchronization/mutex.h" -#include "tsl/platform/logging.h" +#include "xla/tsl/platform/logging.h" namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_node_context.h b/xla/stream_executor/tpu/tpu_node_context.h index ba51e611a900a..c36b5dd719a39 100644 --- a/xla/stream_executor/tpu/tpu_node_context.h +++ b/xla/stream_executor/tpu/tpu_node_context.h @@ -27,7 +27,7 @@ limitations under the License. #include "xla/stream_executor/device_memory_allocator.h" #include "xla/stream_executor/tpu/tpu_ops_c_api.h" #include "xla/stream_executor/tpu/tpu_platform_interface.h" -#include "tsl/platform/macros.h" +#include "xla/tsl/platform/macros.h" namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_on_demand_compiler.cc b/xla/stream_executor/tpu/tpu_on_demand_compiler.cc index 254260e48579c..168d01d24ac9d 100644 --- a/xla/stream_executor/tpu/tpu_on_demand_compiler.cc +++ b/xla/stream_executor/tpu/tpu_on_demand_compiler.cc @@ -37,8 +37,8 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_executor_api.h" #include "xla/stream_executor/tpu/tpu_executor_c_api.h" #include "xla/stream_executor/tpu/tpu_platform_id.h" +#include "xla/tsl/platform/statusor.h" #include "xla/util.h" -#include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/stream_executor/tpu/tpu_op_executable.h b/xla/stream_executor/tpu/tpu_op_executable.h index c87f721785460..1acd0b0994dcb 100644 --- a/xla/stream_executor/tpu/tpu_op_executable.h +++ b/xla/stream_executor/tpu/tpu_op_executable.h @@ -29,7 +29,7 @@ limitations under the License. #include "xla/stream_executor/tpu/c_api_decl.h" #include "xla/stream_executor/tpu/tpu_executable_interface.h" #include "xla/stream_executor/tpu/tpu_ops_c_api.h" -#include "tsl/platform/macros.h" +#include "xla/tsl/platform/macros.h" namespace tensorflow { diff --git a/xla/stream_executor/tpu/tpu_platform.cc b/xla/stream_executor/tpu/tpu_platform.cc index 8a3c5997e76f2..ee0b93eebcc60 100644 --- a/xla/stream_executor/tpu/tpu_platform.cc +++ b/xla/stream_executor/tpu/tpu_platform.cc @@ -36,8 +36,8 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_platform_id.h" #include "xla/stream_executor/tpu/tpu_platform_interface.h" #include "xla/stream_executor/tpu/tpu_topology.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep -#include "tsl/platform/status.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/status.h" namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_platform.h b/xla/stream_executor/tpu/tpu_platform.h index 65cdd0e294acb..01de6d1f3eae7 100644 --- a/xla/stream_executor/tpu/tpu_platform.h +++ b/xla/stream_executor/tpu/tpu_platform.h @@ -36,7 +36,7 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_executor_c_api.h" // IWYU pragma: keep #include "xla/stream_executor/tpu/tpu_platform_interface.h" #include "xla/stream_executor/tpu/tpu_topology.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_platform_interface.cc b/xla/stream_executor/tpu/tpu_platform_interface.cc index 4f4a45b67aefe..e9f9fc0090bdf 100644 --- a/xla/stream_executor/tpu/tpu_platform_interface.cc +++ b/xla/stream_executor/tpu/tpu_platform_interface.cc @@ -20,9 +20,9 @@ limitations under the License. #include "absl/synchronization/mutex.h" #include "xla/stream_executor/platform.h" #include "xla/stream_executor/platform_manager.h" +#include "xla/tsl/platform/env.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep #include "xla/tsl/protobuf/error_codes.pb.h" -#include "tsl/platform/env.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_topology.h b/xla/stream_executor/tpu/tpu_topology.h index 8c5f6ae19285a..c763a083d60e4 100644 --- a/xla/stream_executor/tpu/tpu_topology.h +++ b/xla/stream_executor/tpu/tpu_topology.h @@ -21,7 +21,7 @@ limitations under the License. #include #include "xla/stream_executor/tpu/c_api_decl.h" -#include "tsl/platform/types.h" +#include "xla/tsl/platform/types.h" namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tpu_transfer_manager.cc b/xla/stream_executor/tpu/tpu_transfer_manager.cc index a369813a5fe36..f3d637380c524 100644 --- a/xla/stream_executor/tpu/tpu_transfer_manager.cc +++ b/xla/stream_executor/tpu/tpu_transfer_manager.cc @@ -43,8 +43,8 @@ limitations under the License. #include "xla/stream_executor/tpu/tpu_executor_c_api.h" #include "xla/stream_executor/tpu/tpu_platform.h" #include "xla/stream_executor/tpu/tpu_platform_id.h" +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep #include "tsl/platform/casts.h" -#include "tsl/platform/logging.h" // IWYU pragma: keep namespace tensorflow { namespace tpu { diff --git a/xla/stream_executor/tpu/tsl_status_helper.h b/xla/stream_executor/tpu/tsl_status_helper.h index 074b7703d09e2..cdf10fcee95f1 100644 --- a/xla/stream_executor/tpu/tsl_status_helper.h +++ b/xla/stream_executor/tpu/tsl_status_helper.h @@ -20,7 +20,7 @@ limitations under the License. #include "xla/stream_executor/tpu/c_api_decl.h" #include "xla/tsl/c/tsl_status.h" #include "xla/tsl/c/tsl_status_helper.h" -#include "tsl/platform/status.h" +#include "xla/tsl/platform/status.h" class TslStatusHelper { public: