From d3236ddfa65c18dd57a62b6c82caf056f882c457 Mon Sep 17 00:00:00 2001 From: David Dunleavy Date: Mon, 27 Jan 2025 10:33: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: 720223479 --- xla/python/ifrt/hlo/BUILD | 6 +++--- xla/python/ifrt/hlo/hlo_program_serdes.cc | 2 +- xla/python/ifrt/hlo/hlo_program_serdes_test.cc | 4 ++-- xla/python/ifrt/ir/BUILD | 16 ++++++++-------- xla/python/ifrt/ir/ifrt_ir_program.cc | 2 +- xla/python/ifrt/ir/ifrt_ir_program_serdes.cc | 2 +- .../ifrt/ir/ifrt_ir_program_serdes_test.cc | 4 ++-- xla/python/ifrt/ir/ifrt_ir_program_test.cc | 4 ++-- xla/python/ifrt/ir/ir_py.cc | 2 +- xla/python/ifrt/ir/sharding_param.cc | 2 +- xla/python/ifrt/ir/tests/BUILD | 10 +++++----- .../ifrt/ir/tests/executable_impl_test_base.cc | 2 +- .../ifrt/ir/tests/executable_impl_test_base.h | 2 +- .../ifrt/ir/tests/executable_impl_test_lib.cc | 6 +++--- xla/python/ifrt/ir/transforms/BUILD | 3 +-- ...rify_bound_external_loaded_executable_pass.cc | 2 +- .../multi_threaded_atom_program_compiler.cc | 6 +++--- .../multi_threaded_atom_program_compiler.h | 2 +- xla/python/ifrt/support/BUILD | 4 ++-- .../ifrt/support/sharding_conversions_test.cc | 4 ++-- 20 files changed, 42 insertions(+), 43 deletions(-) diff --git a/xla/python/ifrt/hlo/BUILD b/xla/python/ifrt/hlo/BUILD index 90088626eba01..4ff89b6b194c4 100644 --- a/xla/python/ifrt/hlo/BUILD +++ b/xla/python/ifrt/hlo/BUILD @@ -32,6 +32,7 @@ cc_library( "//xla/mlir_hlo:mhlo_passes", "//xla/pjrt:mlir_to_hlo", "//xla/python/ifrt:serdes", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", @@ -40,7 +41,6 @@ cc_library( "@llvm-project//mlir:Pass", "@llvm-project//mlir:Support", "@stablehlo//:stablehlo_serialization", - "@tsl//tsl/platform:statusor", ], alwayslink = True, ) @@ -55,6 +55,8 @@ xla_cc_test( "//xla/pjrt:mlir_to_hlo", "//xla/python/ifrt:serdes", "//xla/python/ifrt:serdes_proto_cc", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:string_view", @@ -63,7 +65,5 @@ xla_cc_test( "@llvm-project//mlir:FuncDialect", "@llvm-project//mlir:IR", "@llvm-project//mlir:Support", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", ], ) diff --git a/xla/python/ifrt/hlo/hlo_program_serdes.cc b/xla/python/ifrt/hlo/hlo_program_serdes.cc index cb196d563cf3b..b620ecc481020 100644 --- a/xla/python/ifrt/hlo/hlo_program_serdes.cc +++ b/xla/python/ifrt/hlo/hlo_program_serdes.cc @@ -33,7 +33,7 @@ limitations under the License. #include "xla/pjrt/mlir_to_hlo.h" #include "xla/python/ifrt/hlo/hlo_program.h" #include "xla/python/ifrt/serdes.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/hlo/hlo_program_serdes_test.cc b/xla/python/ifrt/hlo/hlo_program_serdes_test.cc index 650d944d7b0e7..859ba3715261a 100644 --- a/xla/python/ifrt/hlo/hlo_program_serdes_test.cc +++ b/xla/python/ifrt/hlo/hlo_program_serdes_test.cc @@ -33,8 +33,8 @@ limitations under the License. #include "xla/python/ifrt/hlo/hlo_program.h" #include "xla/python/ifrt/serdes.h" #include "xla/python/ifrt/serdes.pb.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/ir/BUILD b/xla/python/ifrt/ir/BUILD index 4af9816a62a7f..7fcd5accaab9c 100644 --- a/xla/python/ifrt/ir/BUILD +++ b/xla/python/ifrt/ir/BUILD @@ -175,13 +175,13 @@ cc_library( visibility = ["//xla/python/ifrt:friends"], deps = [ ":sharding_param_proto_cc", + "//xla/tsl/platform:errors", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", "@llvm-project//mlir:Support", - "@tsl//tsl/platform:errors", ], ) @@ -203,6 +203,7 @@ cc_library( "//xla/python/ifrt", "//xla/python/ifrt:serdes", "//xla/python/pjrt_ifrt:xla_ifrt", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", @@ -210,7 +211,6 @@ cc_library( "@com_google_absl//absl/strings:string_view", "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", - "@tsl//tsl/platform:statusor", ], ) @@ -235,10 +235,10 @@ xla_cc_test( "//xla/client:executable_build_options", "//xla/pjrt:pjrt_executable", "//xla/service:computation_placer_hdr", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_absl//absl/strings", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], ) @@ -256,6 +256,7 @@ cc_library( "//xla/python/ifrt:serdes", "//xla/python/ifrt/ir/transforms:passes", "//xla/python/ifrt/support:module_parsing", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", @@ -267,7 +268,6 @@ cc_library( "@llvm-project//mlir:IR", "@llvm-project//mlir:Pass", "@llvm-project//mlir:Support", - "@tsl//tsl/platform:statusor", ], alwayslink = True, ) @@ -281,14 +281,14 @@ xla_cc_test( ":version", "//xla/python/ifrt:serdes", "//xla/python/ifrt/support:module_parsing", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/status", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest_main", "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", "@stablehlo//:version", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", ], ) @@ -484,6 +484,7 @@ tsl_pybind_extension( "//xla/pjrt:status_casters", "//xla/python/ifrt/ir/transforms:utils", "//xla/python/ifrt/support:module_parsing", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:string_view", "@llvm-project//mlir:CAPIIRHeaders", @@ -491,6 +492,5 @@ tsl_pybind_extension( "@llvm-project//mlir:MLIRBindingsPythonHeaders", "@pybind11", "@pybind11_abseil//pybind11_abseil:absl_casters", - "@tsl//tsl/platform:statusor", ], ) diff --git a/xla/python/ifrt/ir/ifrt_ir_program.cc b/xla/python/ifrt/ir/ifrt_ir_program.cc index fb0f594ef1f37..ab49f181087f9 100644 --- a/xla/python/ifrt/ir/ifrt_ir_program.cc +++ b/xla/python/ifrt/ir/ifrt_ir_program.cc @@ -31,7 +31,7 @@ limitations under the License. #include "xla/python/ifrt/device.h" #include "xla/python/ifrt/executable.h" #include "xla/python/pjrt_ifrt/xla_compiler.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/ifrt_ir_program_serdes.cc b/xla/python/ifrt/ir/ifrt_ir_program_serdes.cc index 89b50598fb4cd..efed2f89420fc 100644 --- a/xla/python/ifrt/ir/ifrt_ir_program_serdes.cc +++ b/xla/python/ifrt/ir/ifrt_ir_program_serdes.cc @@ -40,7 +40,7 @@ limitations under the License. #include "xla/python/ifrt/serdes.h" #include "xla/python/ifrt/support/module_parsing.h" #include "xla/status_macros.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/ifrt_ir_program_serdes_test.cc b/xla/python/ifrt/ir/ifrt_ir_program_serdes_test.cc index 6a06c0852ad40..3eba2d3cf21be 100644 --- a/xla/python/ifrt/ir/ifrt_ir_program_serdes_test.cc +++ b/xla/python/ifrt/ir/ifrt_ir_program_serdes_test.cc @@ -31,8 +31,8 @@ limitations under the License. #include "xla/python/ifrt/ir/version.h" #include "xla/python/ifrt/serdes.h" #include "xla/python/ifrt/support/module_parsing.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/ir/ifrt_ir_program_test.cc b/xla/python/ifrt/ir/ifrt_ir_program_test.cc index 7c8f90168d1ad..bf52ca7e8e1c7 100644 --- a/xla/python/ifrt/ir/ifrt_ir_program_test.cc +++ b/xla/python/ifrt/ir/ifrt_ir_program_test.cc @@ -25,8 +25,8 @@ limitations under the License. #include "xla/pjrt/pjrt_executable.h" #include "xla/python/ifrt/ir/ifrt_ir_compile_options.pb.h" #include "xla/service/computation_placer.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/ir/ir_py.cc b/xla/python/ifrt/ir/ir_py.cc index 806cccd73bbf0..e2c53a5b7ac0e 100644 --- a/xla/python/ifrt/ir/ir_py.cc +++ b/xla/python/ifrt/ir/ir_py.cc @@ -33,7 +33,7 @@ limitations under the License. #include "xla/python/ifrt/ir/transforms/utils.h" #include "xla/python/ifrt/ir/version.h" #include "xla/python/ifrt/support/module_parsing.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/sharding_param.cc b/xla/python/ifrt/ir/sharding_param.cc index 39c286f5b55af..e40ac373e8d3b 100644 --- a/xla/python/ifrt/ir/sharding_param.cc +++ b/xla/python/ifrt/ir/sharding_param.cc @@ -36,7 +36,7 @@ limitations under the License. #include "mlir/IR/OpImplementation.h" #include "mlir/Support/LogicalResult.h" #include "xla/python/ifrt/ir/sharding_param.pb.h" -#include "tsl/platform/errors.h" +#include "xla/tsl/platform/errors.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/tests/BUILD b/xla/python/ifrt/ir/tests/BUILD index 60b86dcf3a3d8..3a15bdb4fd57d 100644 --- a/xla/python/ifrt/ir/tests/BUILD +++ b/xla/python/ifrt/ir/tests/BUILD @@ -98,6 +98,8 @@ cc_library( "//xla/python/ifrt/ir/transforms:passes", "//xla/python/ifrt/support:module_parsing", "//xla/tsl/concurrency:ref_count", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", @@ -108,8 +110,6 @@ cc_library( "@llvm-project//mlir:Pass", "@llvm-project//mlir:Support", "@stablehlo//:version", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], ) @@ -131,13 +131,13 @@ cc_library( "//xla/service:computation_placer_hdr", "//xla/tsl/concurrency:ref_count", "//xla/tsl/lib/core:status_test_util", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/types:span", "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:test", ], alwayslink = True, ) diff --git a/xla/python/ifrt/ir/tests/executable_impl_test_base.cc b/xla/python/ifrt/ir/tests/executable_impl_test_base.cc index 341bcfc92ca6a..b056271145831 100644 --- a/xla/python/ifrt/ir/tests/executable_impl_test_base.cc +++ b/xla/python/ifrt/ir/tests/executable_impl_test_base.cc @@ -49,7 +49,7 @@ limitations under the License. #include "xla/python/ifrt/test_util.h" #include "xla/status_macros.h" #include "xla/tsl/concurrency/ref_count.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/tests/executable_impl_test_base.h b/xla/python/ifrt/ir/tests/executable_impl_test_base.h index 1297a6043393b..142494d3b2f1b 100644 --- a/xla/python/ifrt/ir/tests/executable_impl_test_base.h +++ b/xla/python/ifrt/ir/tests/executable_impl_test_base.h @@ -33,7 +33,7 @@ limitations under the License. #include "xla/python/ifrt/ir/version.h" #include "xla/python/ifrt/shape.h" #include "xla/tsl/concurrency/ref_count.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/test.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/tests/executable_impl_test_lib.cc b/xla/python/ifrt/ir/tests/executable_impl_test_lib.cc index ebfb197fe0d6f..93adbbc0736a2 100644 --- a/xla/python/ifrt/ir/tests/executable_impl_test_lib.cc +++ b/xla/python/ifrt/ir/tests/executable_impl_test_lib.cc @@ -40,9 +40,9 @@ limitations under the License. #include "xla/service/computation_placer.h" #include "xla/tsl/concurrency/ref_count.h" #include "xla/tsl/lib/core/status_test_util.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/ir/transforms/BUILD b/xla/python/ifrt/ir/transforms/BUILD index 27a293dbda747..040efe5899be7 100644 --- a/xla/python/ifrt/ir/transforms/BUILD +++ b/xla/python/ifrt/ir/transforms/BUILD @@ -89,6 +89,7 @@ cc_library( "//xla/service/spmd/shardy:constants", "//xla/service/spmd/shardy:utils", "//xla/tsl/platform:env", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/cleanup", "@com_google_absl//absl/container:btree", "@com_google_absl//absl/container:flat_hash_map", @@ -114,11 +115,9 @@ cc_library( "@stablehlo//:register", "@stablehlo//:stablehlo_ops", "@stablehlo//:stablehlo_serialization", - "@tsl//tsl/platform:env", "@tsl//tsl/platform:fingerprint", "@tsl//tsl/platform:path", "@tsl//tsl/platform:protobuf", - "@tsl//tsl/platform:statusor", ], ) diff --git a/xla/python/ifrt/ir/transforms/ifrt_verify_bound_external_loaded_executable_pass.cc b/xla/python/ifrt/ir/transforms/ifrt_verify_bound_external_loaded_executable_pass.cc index dc00af0184012..6b7e0d3b5ae5f 100644 --- a/xla/python/ifrt/ir/transforms/ifrt_verify_bound_external_loaded_executable_pass.cc +++ b/xla/python/ifrt/ir/transforms/ifrt_verify_bound_external_loaded_executable_pass.cc @@ -43,7 +43,7 @@ limitations under the License. #include "xla/python/ifrt/ir/transforms/passes.h" #include "xla/python/ifrt/support/sharding_conversions.h" #include "xla/service/hlo.pb.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.cc b/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.cc index de3d43f30e918..f676317cf5bc8 100644 --- a/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.cc +++ b/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.cc @@ -52,9 +52,9 @@ limitations under the License. #include "xla/service/computation_placer.h" #include "xla/service/hlo.pb.h" #include "xla/status_macros.h" -#include "tsl/platform/env.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/threadpool.h" +#include "xla/tsl/platform/env.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/threadpool.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.h b/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.h index c004b522dcb02..562af8414b118 100644 --- a/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.h +++ b/xla/python/ifrt/ir/transforms/multi_threaded_atom_program_compiler.h @@ -28,7 +28,7 @@ limitations under the License. #include "xla/python/ifrt/future.h" #include "xla/python/ifrt/ir/atom_program_compiler.h" #include "xla/python/ifrt/ir/ifrt_ops.h" -#include "tsl/platform/threadpool.h" +#include "xla/tsl/platform/threadpool.h" namespace xla { namespace ifrt { diff --git a/xla/python/ifrt/support/BUILD b/xla/python/ifrt/support/BUILD index a5a5494e0c801..9bb54ce327caf 100644 --- a/xla/python/ifrt/support/BUILD +++ b/xla/python/ifrt/support/BUILD @@ -67,13 +67,13 @@ xla_cc_test( "//xla/python/ifrt/ir:sharding_param", "//xla/tsl/concurrency:ref_count", "//xla/tsl/lib/core:status_test_util", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:statusor", ], ) diff --git a/xla/python/ifrt/support/sharding_conversions_test.cc b/xla/python/ifrt/support/sharding_conversions_test.cc index d52a8b44f9dfc..9de841d2baf33 100644 --- a/xla/python/ifrt/support/sharding_conversions_test.cc +++ b/xla/python/ifrt/support/sharding_conversions_test.cc @@ -41,9 +41,9 @@ limitations under the License. #include "xla/shape.h" #include "xla/tsl/concurrency/ref_count.h" #include "xla/tsl/lib/core/status_test_util.h" +#include "xla/tsl/platform/status_matchers.h" +#include "xla/tsl/platform/statusor.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/status_matchers.h" -#include "tsl/platform/statusor.h" namespace xla { namespace ifrt {