From 5d6c28df25ae8c1ae4ee96a7176c095753d6619b Mon Sep 17 00:00:00 2001 From: David Dunleavy Date: Wed, 15 Jan 2025 19:50:43 -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: 716048518 --- xla/python/ifrt_proxy/common/BUILD | 16 ++++---- xla/python/ifrt_proxy/common/array_util.cc | 2 +- .../ifrt_proxy/common/array_util_test.cc | 4 +- xla/python/ifrt_proxy/common/proto_util.cc | 2 +- xla/python/ifrt_proxy/common/types_test.cc | 6 +-- xla/python/ifrt_proxy/integration_tests/BUILD | 10 ++--- .../integration_tests/mock_array_test.cc | 6 +-- .../register_pjrt_cpu_for_ifrt_api_tests.cc | 4 +- xla/python/ifrt_proxy/server/BUILD | 40 +++++++++---------- xla/python/ifrt_proxy/server/grpc_server.cc | 2 +- .../ifrt_proxy/server/grpc_server_test.cc | 6 +-- .../server/grpc_service_impl_test.cc | 4 +- .../ifrt_proxy/server/host_buffer_test.cc | 4 +- xla/python/ifrt_proxy/server/host_callback.cc | 2 +- xla/python/ifrt_proxy/server/ifrt_backend.cc | 10 ++--- xla/python/ifrt_proxy/server/ifrt_backend.h | 2 +- .../ifrt_proxy/server/ifrt_backend_test.cc | 12 +++--- xla/python/ifrt_proxy/server/version_test.cc | 2 +- 18 files changed, 67 insertions(+), 67 deletions(-) diff --git a/xla/python/ifrt_proxy/common/BUILD b/xla/python/ifrt_proxy/common/BUILD index e4e32a546e304..f994ff87efcf6 100644 --- a/xla/python/ifrt_proxy/common/BUILD +++ b/xla/python/ifrt_proxy/common/BUILD @@ -103,6 +103,7 @@ cc_library( "//xla/python/ifrt:serdes", "//xla/python/ifrt:sharding_serdes", "//xla/tsl/concurrency:ref_count", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/hash", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", @@ -112,7 +113,6 @@ cc_library( "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/types:span", "@llvm-project//llvm:Support", - "@tsl//tsl/platform:statusor", ] + if_google(["@com_google_absl//absl/types:source_location"]), ) @@ -123,10 +123,10 @@ ifrt_proxy_cc_test( ":types", ":types_proto_cc", "//xla/pjrt:pjrt_common", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], ) @@ -142,13 +142,13 @@ cc_library( deps = [ ":array_util_proto_cc", "//xla/python/ifrt", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:cord", "@com_google_absl//absl/types:span", - "@tsl//tsl/platform:statusor", ], ) @@ -158,11 +158,11 @@ ifrt_proxy_cc_test( deps = [ ":array_util", "//xla/python/ifrt", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/strings:cord", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", ], ) @@ -184,10 +184,10 @@ cc_library( hdrs = ["proto_util.h"], deps = [ ":ifrt_service_proto_cc", + "//xla/tsl/platform:status_to_from_proto", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:string_view", - "@tsl//tsl/platform:status_to_from_proto", ], ) diff --git a/xla/python/ifrt_proxy/common/array_util.cc b/xla/python/ifrt_proxy/common/array_util.cc index 1c3f2ac8643ac..2822fbc33f83d 100644 --- a/xla/python/ifrt_proxy/common/array_util.cc +++ b/xla/python/ifrt_proxy/common/array_util.cc @@ -29,7 +29,7 @@ #include "xla/python/ifrt/dtype.h" #include "xla/python/ifrt/shape.h" #include "xla/python/ifrt_proxy/common/array_util.pb.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/common/array_util_test.cc b/xla/python/ifrt_proxy/common/array_util_test.cc index 86e1e8485c0e1..4941477d11cfc 100644 --- a/xla/python/ifrt_proxy/common/array_util_test.cc +++ b/xla/python/ifrt_proxy/common/array_util_test.cc @@ -26,8 +26,8 @@ #include "absl/strings/string_view.h" #include "xla/python/ifrt/dtype.h" #include "xla/python/ifrt/shape.h" -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/common/proto_util.cc b/xla/python/ifrt_proxy/common/proto_util.cc index 6f9bb8c885071..6ac7c9b16c21b 100644 --- a/xla/python/ifrt_proxy/common/proto_util.cc +++ b/xla/python/ifrt_proxy/common/proto_util.cc @@ -19,7 +19,7 @@ #include "absl/status/status.h" #include "xla/python/ifrt_proxy/common/ifrt_service.pb.h" -#include "tsl/platform/status_to_from_proto.h" +#include "xla/tsl/platform/status_to_from_proto.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/common/types_test.cc b/xla/python/ifrt_proxy/common/types_test.cc index fdbf3ff123cc8..67f61ff3207dd 100644 --- a/xla/python/ifrt_proxy/common/types_test.cc +++ b/xla/python/ifrt_proxy/common/types_test.cc @@ -22,9 +22,9 @@ #include #include "xla/pjrt/pjrt_common.h" #include "xla/python/ifrt_proxy/common/types.pb.h" -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/integration_tests/BUILD b/xla/python/ifrt_proxy/integration_tests/BUILD index 8fe0ad0e397b5..1460a72c23250 100644 --- a/xla/python/ifrt_proxy/integration_tests/BUILD +++ b/xla/python/ifrt_proxy/integration_tests/BUILD @@ -32,11 +32,11 @@ cc_library( "//xla/python/ifrt_proxy/client:registry", "//xla/python/ifrt_proxy/server:grpc_server", "//xla/python/pjrt_ifrt", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/strings", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], alwayslink = True, ) @@ -104,6 +104,9 @@ ifrt_proxy_cc_test( "//xla/python/ifrt_proxy/server:grpc_server", "//xla/python/pjrt_ifrt", "//xla/tsl/concurrency:ref_count", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/log:check", @@ -114,8 +117,5 @@ ifrt_proxy_cc_test( "@com_google_absl//absl/time", "@com_google_absl//absl/types:span", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], ) diff --git a/xla/python/ifrt_proxy/integration_tests/mock_array_test.cc b/xla/python/ifrt_proxy/integration_tests/mock_array_test.cc index fcd2355c46a18..1fe394793eb60 100644 --- a/xla/python/ifrt_proxy/integration_tests/mock_array_test.cc +++ b/xla/python/ifrt_proxy/integration_tests/mock_array_test.cc @@ -51,9 +51,9 @@ #include "xla/python/ifrt_proxy/server/grpc_server.h" #include "xla/python/pjrt_ifrt/pjrt_client.h" #include "xla/tsl/concurrency/ref_count.h" -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/integration_tests/register_pjrt_cpu_for_ifrt_api_tests.cc b/xla/python/ifrt_proxy/integration_tests/register_pjrt_cpu_for_ifrt_api_tests.cc index e8be6c6601d2d..e8fce0096a79c 100644 --- a/xla/python/ifrt_proxy/integration_tests/register_pjrt_cpu_for_ifrt_api_tests.cc +++ b/xla/python/ifrt_proxy/integration_tests/register_pjrt_cpu_for_ifrt_api_tests.cc @@ -32,8 +32,8 @@ #include "xla/python/ifrt_proxy/client/registry.h" #include "xla/python/ifrt_proxy/server/grpc_server.h" #include "xla/python/pjrt_ifrt/pjrt_client.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/BUILD b/xla/python/ifrt_proxy/server/BUILD index c9261232f3627..9ebf62b49c1fb 100644 --- a/xla/python/ifrt_proxy/server/BUILD +++ b/xla/python/ifrt_proxy/server/BUILD @@ -30,6 +30,7 @@ cc_library( "//xla/python/ifrt_proxy/common:grpc_credentials", "//xla/python/ifrt_proxy/common:grpc_ifrt_service_cc_grpc_proto", "//xla/python/ifrt_proxy/common:ifrt_service_proto_cc", + "//xla/tsl/platform:statusor", "@com_github_grpc_grpc//:grpc", "@com_github_grpc_grpc//:grpc++", "@com_google_absl//absl/functional:any_invocable", @@ -38,7 +39,6 @@ cc_library( "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:string_view", - "@tsl//tsl/platform:statusor", ], ) @@ -49,12 +49,12 @@ ifrt_proxy_cc_test( deps = [ ":grpc_server", "//xla/python/ifrt_proxy/common:grpc_ifrt_service_cc_grpc_proto", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], ) @@ -101,6 +101,8 @@ ifrt_proxy_cc_test( "//xla/python/ifrt_proxy/client:grpc_host_buffer", "//xla/python/ifrt_proxy/common:grpc_ifrt_service_cc_grpc_proto", "//xla/python/ifrt_proxy/common:ifrt_service_proto_cc", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:test", "@com_github_grpc_grpc//:grpc++", "@com_google_absl//absl/log", "@com_google_absl//absl/status", @@ -108,8 +110,6 @@ ifrt_proxy_cc_test( "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:cord", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:test", ], ) @@ -138,6 +138,10 @@ cc_library( "//xla/python/ifrt_proxy/common:types_proto_cc", "//xla/python/pjrt_ifrt:xla_ifrt", "//xla/tsl/concurrency:ref_count", + "//xla/tsl/platform:env", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:status_to_from_proto", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/container:flat_hash_map", @@ -153,10 +157,6 @@ cc_library( "@com_google_absl//absl/time", "@com_google_absl//absl/types:span", "@llvm-project//llvm:Support", - "@tsl//tsl/platform:env", - "@tsl//tsl/platform:errors", - "@tsl//tsl/platform:status_to_from_proto", - "@tsl//tsl/platform:statusor", ], ) @@ -189,6 +189,12 @@ ifrt_proxy_cc_test( "//xla/service:computation_placer_hdr", "//xla/tsl/concurrency:ref_count", "//xla/tsl/lib/core:status_test_util", + "//xla/tsl/platform:env", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:status_to_from_proto", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "//xla/tsl/protobuf:error_codes_proto_impl_cc", "//xla/tsl/protobuf:status_proto_cc", "@com_google_absl//absl/base:core_headers", @@ -204,13 +210,7 @@ ifrt_proxy_cc_test( "@com_google_absl//absl/types:span", "@com_google_googletest//:gtest_main", "@llvm-project//llvm:Support", - "@tsl//tsl/platform:env", - "@tsl//tsl/platform:errors", "@tsl//tsl/platform:protobuf", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:status_to_from_proto", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], ) @@ -257,6 +257,7 @@ cc_library( "//xla/python/pjrt_ifrt", "//xla/python/pjrt_ifrt:xla_host_callback_proto_cc", "//xla/tsl/concurrency:ref_count", + "//xla/tsl/platform:errors", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/functional:bind_front", "@com_google_absl//absl/status", @@ -265,7 +266,6 @@ cc_library( "@com_google_absl//absl/synchronization", "@com_google_absl//absl/types:span", "@llvm-project//llvm:Support", - "@tsl//tsl/platform:errors", ], ) @@ -287,9 +287,9 @@ ifrt_proxy_cc_test( srcs = ["version_test.cc"], deps = [ ":version", + "//xla/tsl/platform:status_matchers", "@com_google_absl//absl/status", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", ], ) @@ -299,11 +299,11 @@ ifrt_proxy_cc_test( deps = [ ":host_buffer", "//xla/python/ifrt", + "//xla/tsl/platform:env", + "//xla/tsl/platform:status_matchers", "@com_google_absl//absl/status", "@com_google_absl//absl/synchronization", "@com_google_absl//absl/time", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:env", - "@tsl//tsl/platform:status_matchers", ], ) diff --git a/xla/python/ifrt_proxy/server/grpc_server.cc b/xla/python/ifrt_proxy/server/grpc_server.cc index 936cd96443d97..7df4f16e29282 100644 --- a/xla/python/ifrt_proxy/server/grpc_server.cc +++ b/xla/python/ifrt_proxy/server/grpc_server.cc @@ -36,7 +36,7 @@ #include "xla/python/ifrt_proxy/server/grpc_service_impl.h" #include "xla/python/ifrt_proxy/server/host_buffer.h" #include "xla/python/ifrt_proxy/server/ifrt_backend.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/grpc_server_test.cc b/xla/python/ifrt_proxy/server/grpc_server_test.cc index 40216bca7876c..a9ee610a2a3eb 100644 --- a/xla/python/ifrt_proxy/server/grpc_server_test.cc +++ b/xla/python/ifrt_proxy/server/grpc_server_test.cc @@ -22,9 +22,9 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "xla/python/ifrt_proxy/common/grpc_ifrt_service.grpc.pb.h" -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/grpc_service_impl_test.cc b/xla/python/ifrt_proxy/server/grpc_service_impl_test.cc index 2f8f553794dc4..5a7ef952fd17a 100644 --- a/xla/python/ifrt_proxy/server/grpc_service_impl_test.cc +++ b/xla/python/ifrt_proxy/server/grpc_service_impl_test.cc @@ -36,8 +36,8 @@ #include "xla/python/ifrt_proxy/server/grpc_server.h" #include "xla/python/ifrt_proxy/server/host_buffer.h" #include "xla/python/ifrt_proxy/server/version.h" -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/host_buffer_test.cc b/xla/python/ifrt_proxy/server/host_buffer_test.cc index 5193b0f7d5eec..77b435711573f 100644 --- a/xla/python/ifrt_proxy/server/host_buffer_test.cc +++ b/xla/python/ifrt_proxy/server/host_buffer_test.cc @@ -25,8 +25,8 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "xla/python/ifrt/future.h" -#include "tsl/platform/env.h" -#include "tsl/platform/status_matchers.h" +#include "xla/tsl/platform/env.h" +#include "xla/tsl/platform/status_matchers.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/host_callback.cc b/xla/python/ifrt_proxy/server/host_callback.cc index 5bc7320841549..52d698e01b839 100644 --- a/xla/python/ifrt_proxy/server/host_callback.cc +++ b/xla/python/ifrt_proxy/server/host_callback.cc @@ -40,7 +40,7 @@ #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/tsl/concurrency/ref_count.h" -#include "tsl/platform/errors.h" +#include "xla/tsl/platform/errors.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/ifrt_backend.cc b/xla/python/ifrt_proxy/server/ifrt_backend.cc index 4bcb18893601c..e8edd3676757c 100644 --- a/xla/python/ifrt_proxy/server/ifrt_backend.cc +++ b/xla/python/ifrt_proxy/server/ifrt_backend.cc @@ -74,12 +74,12 @@ #include "xla/python/pjrt_ifrt/xla_compiler.h" #include "xla/status_macros.h" #include "xla/tsl/concurrency/ref_count.h" +#include "xla/tsl/platform/env.h" +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/status_to_from_proto.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/threadpool.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/env.h" -#include "tsl/platform/errors.h" -#include "tsl/platform/status_to_from_proto.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/threadpool.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/ifrt_backend.h b/xla/python/ifrt_proxy/server/ifrt_backend.h index 37c06dc751eab..af4450da59856 100644 --- a/xla/python/ifrt_proxy/server/ifrt_backend.h +++ b/xla/python/ifrt_proxy/server/ifrt_backend.h @@ -39,7 +39,7 @@ #include "xla/python/ifrt_proxy/server/host_buffer.h" #include "xla/python/ifrt_proxy/server/host_callback.h" #include "xla/tsl/concurrency/ref_count.h" -#include "tsl/platform/threadpool.h" +#include "xla/tsl/platform/threadpool.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/ifrt_backend_test.cc b/xla/python/ifrt_proxy/server/ifrt_backend_test.cc index d19c99c022f9a..5820f94e5b641 100644 --- a/xla/python/ifrt_proxy/server/ifrt_backend_test.cc +++ b/xla/python/ifrt_proxy/server/ifrt_backend_test.cc @@ -71,16 +71,16 @@ #include "xla/status_macros.h" #include "xla/tsl/concurrency/ref_count.h" #include "xla/tsl/lib/core/status_test_util.h" +#include "xla/tsl/platform/env.h" +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/status_to_from_proto.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/test.h" #include "xla/tsl/protobuf/error_codes.pb.h" #include "xla/tsl/protobuf/status.pb.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/env.h" -#include "tsl/platform/errors.h" #include "tsl/platform/protobuf.h" // IWYU pragma: keep -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/status_to_from_proto.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt_proxy/server/version_test.cc b/xla/python/ifrt_proxy/server/version_test.cc index efebcad9d65d9..45145b4cdc1e6 100644 --- a/xla/python/ifrt_proxy/server/version_test.cc +++ b/xla/python/ifrt_proxy/server/version_test.cc @@ -19,7 +19,7 @@ #include #include #include "absl/status/status.h" -#include "tsl/platform/status_matchers.h" +#include "xla/tsl/platform/status_matchers.h" namespace xla { namespace ifrt {