From 06fca59dd711781c052a2be9b44e0327fe4cf8b3 Mon Sep 17 00:00:00 2001 From: David Dunleavy Date: Wed, 15 Jan 2025 13:43:47 -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: 715928852 --- xla/backends/cpu/runtime/xnnpack/BUILD | 12 +++++----- .../cpu/runtime/xnnpack/object_pool.h | 2 +- .../cpu/runtime/xnnpack/xnn_interop.h | 2 +- .../runtime/xnnpack/xnn_threadpool_test.cc | 2 +- xla/backends/gpu/collectives/BUILD | 13 ++++++----- xla/backends/gpu/collectives/gpu_clique.cc | 2 +- .../gpu/collectives/gpu_clique_key.cc | 2 +- .../gpu/collectives/gpu_clique_key_test.cc | 2 +- xla/backends/gpu/collectives/nccl_errors.h | 6 ++--- xla/backends/profiler/plugin/BUILD | 8 +++---- xla/backends/profiler/plugin/plugin_tracer.cc | 2 +- .../profiler/plugin/plugin_tracer_impl.cc | 2 +- .../plugin/plugin_tracer_impl_test.cc | 2 +- .../profiler/plugin/profiler_error.cc | 2 +- xla/hlo/translate/mhlo_to_hlo/BUILD | 22 ++++++++++--------- xla/hlo/translate/mhlo_to_hlo/layout_util.cc | 4 ++-- .../translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc | 6 ++--- .../mhlo_to_hlo/mlir_hlo_to_hlo_test.cc | 4 ++-- xla/hlo/translate/mhlo_to_hlo/translate.cc | 4 ++-- xla/mlir/utils/BUILD | 10 +++++---- xla/mlir/utils/error_util.cc | 2 +- xla/mlir/utils/error_util_test.cc | 2 +- xla/mlir/utils/type_util.cc | 2 +- xla/mlir/utils/type_util_test.cc | 2 +- 24 files changed, 61 insertions(+), 56 deletions(-) diff --git a/xla/backends/cpu/runtime/xnnpack/BUILD b/xla/backends/cpu/runtime/xnnpack/BUILD index 3406c810c9feea..a657f7c5651710 100644 --- a/xla/backends/cpu/runtime/xnnpack/BUILD +++ b/xla/backends/cpu/runtime/xnnpack/BUILD @@ -18,9 +18,9 @@ cc_library( name = "object_pool", hdrs = ["object_pool.h"], deps = [ + "//xla/tsl/platform:statusor", "@com_google_absl//absl/functional:any_invocable", "@com_google_absl//absl/status:statusor", - "@tsl//tsl/platform:statusor", ], ) @@ -81,10 +81,10 @@ cc_library( hdrs = ["xnn_interop.h"], deps = [ "//xla:util", + "//xla/tsl/platform:logging", "@XNNPACK", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/status", - "@tsl//tsl/platform:logging", ], ) @@ -120,15 +120,16 @@ xla_cc_test( ":parallel_loop_runner", ":xnn_threadpool", "//xla/tsl/concurrency:async_value", + "//xla/tsl/platform:env", + "//xla/tsl/platform:test", + "//xla/tsl/platform:test_benchmark", + "//xla/tsl/platform:test_main", "@XNNPACK", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/synchronization", "@com_google_googletest//:gtest_main", "@eigen_archive//:eigen3", "@pthreadpool", - "@tsl//tsl/platform:env", - "@tsl//tsl/platform:test", - "@tsl//tsl/platform:test_benchmark", ], ) @@ -211,7 +212,6 @@ cc_library( "@com_google_absl//absl/types:span", "@eigen_archive//:eigen3", "@pthreadpool", - "@tsl//tsl/platform:statusor", "@tsl//tsl/profiler/lib:traceme", ], ) diff --git a/xla/backends/cpu/runtime/xnnpack/object_pool.h b/xla/backends/cpu/runtime/xnnpack/object_pool.h index 32313c2d04487e..ba19aca54fa31e 100644 --- a/xla/backends/cpu/runtime/xnnpack/object_pool.h +++ b/xla/backends/cpu/runtime/xnnpack/object_pool.h @@ -22,7 +22,7 @@ limitations under the License. #include "absl/functional/any_invocable.h" #include "absl/status/statusor.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla::cpu { diff --git a/xla/backends/cpu/runtime/xnnpack/xnn_interop.h b/xla/backends/cpu/runtime/xnnpack/xnn_interop.h index 47f6aa3d29402a..2bac1916e0fc7a 100644 --- a/xla/backends/cpu/runtime/xnnpack/xnn_interop.h +++ b/xla/backends/cpu/runtime/xnnpack/xnn_interop.h @@ -19,8 +19,8 @@ limitations under the License. #include "xnnpack.h" #include "absl/base/optimization.h" #include "absl/status/status.h" +#include "xla/tsl/platform/logging.h" #include "xla/util.h" -#include "tsl/platform/logging.h" namespace xla::cpu { diff --git a/xla/backends/cpu/runtime/xnnpack/xnn_threadpool_test.cc b/xla/backends/cpu/runtime/xnnpack/xnn_threadpool_test.cc index 7cdf1dd1cb91a0..a2e00865c97b8d 100644 --- a/xla/backends/cpu/runtime/xnnpack/xnn_threadpool_test.cc +++ b/xla/backends/cpu/runtime/xnnpack/xnn_threadpool_test.cc @@ -25,7 +25,7 @@ limitations under the License. #include "pthreadpool.h" #include "xla/backends/cpu/runtime/xnnpack/parallel_loop_runner.h" #include "xla/tsl/concurrency/async_value_ref.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/test.h" namespace xla::cpu { namespace { diff --git a/xla/backends/gpu/collectives/BUILD b/xla/backends/gpu/collectives/BUILD index cc5818f6a8fbd5..301695a1951c5a 100644 --- a/xla/backends/gpu/collectives/BUILD +++ b/xla/backends/gpu/collectives/BUILD @@ -39,12 +39,12 @@ cc_library( "//xla/core/collectives:communicator", "//xla/core/collectives:rank_id", "//xla/service:lockable", + "//xla/tsl/platform:logging", "@com_google_absl//absl/container:btree", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", - "@tsl//tsl/platform:logging", ], ) @@ -58,6 +58,7 @@ cc_library( "//xla/core/collectives:clique_key", "//xla/service:global_device_id", "//xla/tsl/lib/gtl:int_type", + "//xla/tsl/platform:logging", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/hash", "@com_google_absl//absl/log:check", @@ -65,7 +66,6 @@ cc_library( "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:logging", ], ) @@ -76,12 +76,13 @@ xla_cc_test( ":gpu_clique_key", "//xla/core/collectives:clique_id", "//xla/service:global_device_id", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:test", + "//xla/tsl/platform:test_main", "@com_google_absl//absl/container:btree", "@com_google_absl//absl/status", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:test", ], ) @@ -144,12 +145,12 @@ cc_library( "//xla/stream_executor:device_memory", "//xla/stream_executor:stream", "//xla/stream_executor:stream_executor_h", + "//xla/tsl/platform:logging", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@tsl//tsl/platform:casts", - "@tsl//tsl/platform:logging", ], ) @@ -179,8 +180,8 @@ cc_library( visibility = ["//visibility:private"], deps = [ "//xla:util", + "//xla/tsl/platform:logging", "@com_google_absl//absl/strings:str_format", - "@tsl//tsl/platform:logging", ], ) diff --git a/xla/backends/gpu/collectives/gpu_clique.cc b/xla/backends/gpu/collectives/gpu_clique.cc index 3ed6a01a6dcce5..007e69a8679b7f 100644 --- a/xla/backends/gpu/collectives/gpu_clique.cc +++ b/xla/backends/gpu/collectives/gpu_clique.cc @@ -32,7 +32,7 @@ limitations under the License. #include "xla/core/collectives/communicator.h" #include "xla/core/collectives/rank_id.h" #include "xla/service/lockable.h" -#include "tsl/platform/logging.h" +#include "xla/tsl/platform/logging.h" namespace xla::gpu { diff --git a/xla/backends/gpu/collectives/gpu_clique_key.cc b/xla/backends/gpu/collectives/gpu_clique_key.cc index 1bf84795a32f16..ed74ec4d2216df 100644 --- a/xla/backends/gpu/collectives/gpu_clique_key.cc +++ b/xla/backends/gpu/collectives/gpu_clique_key.cc @@ -28,8 +28,8 @@ limitations under the License. #include "absl/types/span.h" #include "xla/core/collectives/clique_key.h" #include "xla/service/global_device_id.h" +#include "xla/tsl/platform/logging.h" #include "tsl/platform/casts.h" -#include "tsl/platform/logging.h" namespace xla::gpu { diff --git a/xla/backends/gpu/collectives/gpu_clique_key_test.cc b/xla/backends/gpu/collectives/gpu_clique_key_test.cc index 792ba8ba2224aa..d210aa0ea9f9c5 100644 --- a/xla/backends/gpu/collectives/gpu_clique_key_test.cc +++ b/xla/backends/gpu/collectives/gpu_clique_key_test.cc @@ -28,7 +28,7 @@ limitations under the License. #include "absl/container/btree_map.h" #include "xla/core/collectives/clique_id.h" #include "xla/service/global_device_id.h" -#include "tsl/platform/test.h" +#include "xla/tsl/platform/test.h" namespace xla::gpu { diff --git a/xla/backends/gpu/collectives/nccl_errors.h b/xla/backends/gpu/collectives/nccl_errors.h index 473fc9f10a14ac..71fa13d28f2a9b 100644 --- a/xla/backends/gpu/collectives/nccl_errors.h +++ b/xla/backends/gpu/collectives/nccl_errors.h @@ -16,9 +16,9 @@ limitations under the License. #ifndef XLA_BACKENDS_GPU_COLLECTIVES_NCCL_ERRORS_H_ #define XLA_BACKENDS_GPU_COLLECTIVES_NCCL_ERRORS_H_ -#include "absl/strings/str_format.h" // IWYU pragma: keep -#include "xla/util.h" // IWYU pragma: keep -#include "tsl/platform/logging.h" // IWYU pragma: keep +#include "absl/strings/str_format.h" // IWYU pragma: keep +#include "xla/tsl/platform/logging.h" // IWYU pragma: keep +#include "xla/util.h" // IWYU pragma: keep //===----------------------------------------------------------------------===// // Collection of helper macros for handling NCCL errors. diff --git a/xla/backends/profiler/plugin/BUILD b/xla/backends/profiler/plugin/BUILD index 8194294b347a79..304b821383a131 100644 --- a/xla/backends/profiler/plugin/BUILD +++ b/xla/backends/profiler/plugin/BUILD @@ -26,9 +26,9 @@ cc_library( visibility = ["//xla:internal"], deps = [ ":profiler_c_api_hdrs", + "//xla/tsl/platform:logging", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", - "@tsl//tsl/platform:logging", "@tsl//tsl/profiler/lib:profiler_interface", "@tsl//tsl/profiler/protobuf:profiler_options_proto_cc", "@tsl//tsl/profiler/protobuf:xplane_proto_cc", @@ -43,9 +43,9 @@ cc_library( visibility = ["//visibility:public"], deps = [ ":profiler_c_api_hdrs", + "//xla/tsl/platform:logging", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", - "@tsl//tsl/platform:logging", ], alwayslink = True, ) @@ -61,7 +61,7 @@ cc_library( deps = [ ":profiler_c_api_hdrs", ":profiler_error", - "@tsl//tsl/platform:logging", + "//xla/tsl/platform:logging", "@tsl//tsl/profiler/lib:profiler_collection", "@tsl//tsl/profiler/lib:profiler_factory", "@tsl//tsl/profiler/lib:profiler_factory_impl", @@ -80,11 +80,11 @@ xla_cc_test( ":plugin_tracer_impl", ":profiler_c_api_hdrs", ":profiler_error", + "//xla/tsl/platform:logging", "//xla/tsl/profiler/utils:xplane_builder", "//xla/tsl/profiler/utils:xplane_visitor", "@com_google_absl//absl/status", "@com_google_googletest//:gtest_main", - "@tsl//tsl/platform:logging", "@tsl//tsl/profiler/lib:profiler_factory", "@tsl//tsl/profiler/lib:profiler_interface", "@tsl//tsl/profiler/protobuf:profiler_options_proto_cc", diff --git a/xla/backends/profiler/plugin/plugin_tracer.cc b/xla/backends/profiler/plugin/plugin_tracer.cc index 86f933afec35bd..8312fe8032045f 100644 --- a/xla/backends/profiler/plugin/plugin_tracer.cc +++ b/xla/backends/profiler/plugin/plugin_tracer.cc @@ -23,7 +23,7 @@ limitations under the License. #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "xla/backends/profiler/plugin/profiler_c_api.h" -#include "tsl/platform/logging.h" +#include "xla/tsl/platform/logging.h" #include "tsl/profiler/protobuf/profiler_options.pb.h" #include "tsl/profiler/protobuf/xplane.pb.h" diff --git a/xla/backends/profiler/plugin/plugin_tracer_impl.cc b/xla/backends/profiler/plugin/plugin_tracer_impl.cc index 63b062103ce669..f5ed20fa5bfbf8 100644 --- a/xla/backends/profiler/plugin/plugin_tracer_impl.cc +++ b/xla/backends/profiler/plugin/plugin_tracer_impl.cc @@ -22,7 +22,7 @@ limitations under the License. #include "xla/backends/profiler/plugin/profiler_c_api.h" #include "xla/backends/profiler/plugin/profiler_error.h" -#include "tsl/platform/logging.h" +#include "xla/tsl/platform/logging.h" #include "tsl/profiler/lib/profiler_collection.h" #include "tsl/profiler/lib/profiler_factory.h" #include "tsl/profiler/protobuf/profiler_options.pb.h" diff --git a/xla/backends/profiler/plugin/plugin_tracer_impl_test.cc b/xla/backends/profiler/plugin/plugin_tracer_impl_test.cc index a0e1cd45407a92..d57e53fb1dd955 100644 --- a/xla/backends/profiler/plugin/plugin_tracer_impl_test.cc +++ b/xla/backends/profiler/plugin/plugin_tracer_impl_test.cc @@ -25,9 +25,9 @@ limitations under the License. #include "xla/backends/profiler/plugin/plugin_tracer.h" #include "xla/backends/profiler/plugin/profiler_c_api.h" #include "xla/backends/profiler/plugin/profiler_error.h" +#include "xla/tsl/platform/logging.h" #include "xla/tsl/profiler/utils/xplane_builder.h" #include "xla/tsl/profiler/utils/xplane_visitor.h" -#include "tsl/platform/logging.h" #include "tsl/profiler/lib/profiler_factory.h" #include "tsl/profiler/lib/profiler_interface.h" #include "tsl/profiler/protobuf/profiler_options.pb.h" diff --git a/xla/backends/profiler/plugin/profiler_error.cc b/xla/backends/profiler/plugin/profiler_error.cc index 7be485b944bf98..a064f6539d02b7 100644 --- a/xla/backends/profiler/plugin/profiler_error.cc +++ b/xla/backends/profiler/plugin/profiler_error.cc @@ -20,7 +20,7 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "xla/backends/profiler/plugin/profiler_c_api.h" -#include "tsl/platform/logging.h" +#include "xla/tsl/platform/logging.h" namespace xla { namespace profiler { diff --git a/xla/hlo/translate/mhlo_to_hlo/BUILD b/xla/hlo/translate/mhlo_to_hlo/BUILD index 51067efe69281c..1580da0186b4fb 100644 --- a/xla/hlo/translate/mhlo_to_hlo/BUILD +++ b/xla/hlo/translate/mhlo_to_hlo/BUILD @@ -46,10 +46,10 @@ cc_library( "//xla:xla_data_proto_cc", "//xla/hlo/builder:xla_builder", "//xla/hlo/ir:hlo", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", - "@tsl//tsl/platform:errors", - "@tsl//tsl/platform:statusor", ], ) @@ -63,13 +63,13 @@ cc_library( "//xla:literal", "//xla:literal_util", "//xla:shape_util", + "//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", ], ) @@ -156,6 +156,9 @@ cc_library( "//xla/service:hlo_module_config", "//xla/service:hlo_proto_cc", "//xla/service/gpu:backend_configs_cc", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:types", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", @@ -174,10 +177,7 @@ cc_library( "@llvm-project//mlir:TransformUtils", "@stablehlo//:base", "@stablehlo//:stablehlo_ops", - "@tsl//tsl/platform:errors", "@tsl//tsl/platform:ml_dtypes", - "@tsl//tsl/platform:statusor", - "@tsl//tsl/platform:types", ], ) @@ -219,14 +219,15 @@ xla_cc_test( ":mlir_hlo_to_hlo", "//xla/mlir/utils:error_util", "//xla/tsl/lib/core:status_test_util", + "//xla/tsl/platform:status_matchers", + "//xla/tsl/platform:test", + "//xla/tsl/platform:test_main", "@com_google_googletest//:gtest_main", "@llvm-project//mlir:FuncDialect", "@llvm-project//mlir:IR", "@llvm-project//mlir:Parser", "@llvm-project//mlir:ShapeDialect", "@stablehlo//:register", - "@tsl//tsl/platform:status_matchers", - "@tsl//tsl/platform:test", ], ) @@ -246,6 +247,8 @@ cc_library( "//xla/service:hlo_module_config", "//xla/service:hlo_proto_cc", "//xla/service:hlo_proto_util", + "//xla/tsl/platform:errors", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/log", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", @@ -255,8 +258,6 @@ cc_library( "@llvm-project//mlir:IR", "@llvm-project//mlir:Parser", "@llvm-project//mlir:Support", - "@tsl//tsl/platform:errors", - "@tsl//tsl/platform:statusor", ], ) @@ -309,6 +310,7 @@ xla_cc_test( "//xla/hlo/testlib:test", "//xla/hlo/translate/hlo_to_mhlo:hlo_utils", "//xla/mlir_hlo", + "//xla/tsl/platform:test_main", "@com_google_absl//absl/status:statusor", "@com_google_googletest//:gtest_main", "@llvm-project//llvm:Support", diff --git a/xla/hlo/translate/mhlo_to_hlo/layout_util.cc b/xla/hlo/translate/mhlo_to_hlo/layout_util.cc index 252ce543813719..c5155d7fa2b15a 100644 --- a/xla/hlo/translate/mhlo_to_hlo/layout_util.cc +++ b/xla/hlo/translate/mhlo_to_hlo/layout_util.cc @@ -21,9 +21,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_sharding.h" #include "xla/shape.h" #include "xla/shape_util.h" +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/statusor.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/errors.h" -#include "tsl/platform/statusor.h" namespace mlir { diff --git a/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc index c67092d2c9585f..16600ff3c5e99e 100644 --- a/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc +++ b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc @@ -98,10 +98,10 @@ limitations under the License. #include "xla/service/hlo_module_config.h" #include "xla/shape.h" #include "xla/shape_util.h" +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/statusor.h" +#include "xla/tsl/platform/types.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/errors.h" -#include "tsl/platform/statusor.h" -#include "tsl/platform/types.h" using ::int64_t; using ::tsl::int16; diff --git a/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo_test.cc b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo_test.cc index ad96da29cd4cfc..56282840dba4f0 100644 --- a/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo_test.cc +++ b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo_test.cc @@ -26,8 +26,8 @@ limitations under the License. #include "stablehlo/dialect/Register.h" #include "xla/mlir/utils/error_util.h" #include "xla/tsl/lib/core/status_test_util.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" // This file should contain tests for interfaces that can't be tested at the // MLIR level. diff --git a/xla/hlo/translate/mhlo_to_hlo/translate.cc b/xla/hlo/translate/mhlo_to_hlo/translate.cc index 0ac14b220f9531..8c0016ff24d264 100644 --- a/xla/hlo/translate/mhlo_to_hlo/translate.cc +++ b/xla/hlo/translate/mhlo_to_hlo/translate.cc @@ -50,8 +50,8 @@ limitations under the License. #include "xla/service/hlo_proto_util.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "tsl/platform/errors.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/errors.h" +#include "xla/tsl/platform/statusor.h" constexpr char kParameterReplicationAttr[] = "mhlo.parameter_replication"; diff --git a/xla/mlir/utils/BUILD b/xla/mlir/utils/BUILD index 99be3ffca63910..a3741f3e477560 100644 --- a/xla/mlir/utils/BUILD +++ b/xla/mlir/utils/BUILD @@ -19,6 +19,7 @@ cc_library( hdrs = ["error_util.h"], compatible_with = get_compatible_with_portable(), deps = [ + "//xla/tsl/platform:logging", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", @@ -26,7 +27,6 @@ cc_library( "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", "@llvm-project//mlir:Support", - "@tsl//tsl/platform:logging", ], ) @@ -36,12 +36,13 @@ cc_test( deps = [ ":error_util", "//xla/tsl/lib/core:status_test_util", + "//xla/tsl/platform:status", + "//xla/tsl/platform:test_main", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_googletest//:gtest_main", "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", - "@tsl//tsl/platform:status", ], ) @@ -54,10 +55,10 @@ cc_library( "//xla:shape_util", "//xla:util", "//xla:xla_data_proto_cc", + "//xla/tsl/platform:statusor", "@com_google_absl//absl/status:statusor", "@llvm-project//mlir:IR", "@llvm-project//mlir:Support", - "@tsl//tsl/platform:statusor", ], ) @@ -68,11 +69,12 @@ xla_cc_test( ":type_util", "//xla:shape_util", "//xla:xla_data_proto_cc", + "//xla/tsl/platform:statusor", + "//xla/tsl/platform:test_main", "@com_google_absl//absl/functional:function_ref", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", - "@tsl//tsl/platform:statusor", ], ) diff --git a/xla/mlir/utils/error_util.cc b/xla/mlir/utils/error_util.cc index 3c45f3fd9ebcde..10ea77c0791ab2 100644 --- a/xla/mlir/utils/error_util.cc +++ b/xla/mlir/utils/error_util.cc @@ -23,7 +23,7 @@ limitations under the License. #include "absl/status/status.h" #include "mlir/IR/Diagnostics.h" #include "mlir/Support/LLVM.h" -#include "tsl/platform/logging.h" +#include "xla/tsl/platform/logging.h" namespace mlir { BaseScopedDiagnosticHandler::BaseScopedDiagnosticHandler(MLIRContext* context, diff --git a/xla/mlir/utils/error_util_test.cc b/xla/mlir/utils/error_util_test.cc index 942809105d24ad..0ecaed67c6cec6 100644 --- a/xla/mlir/utils/error_util_test.cc +++ b/xla/mlir/utils/error_util_test.cc @@ -22,7 +22,7 @@ limitations under the License. #include "mlir/IR/Builders.h" #include "mlir/IR/MLIRContext.h" #include "xla/tsl/lib/core/status_test_util.h" -#include "tsl/platform/status.h" +#include "xla/tsl/platform/status.h" namespace mlir { namespace { diff --git a/xla/mlir/utils/type_util.cc b/xla/mlir/utils/type_util.cc index 8a277035c2a906..cf194c242f8930 100644 --- a/xla/mlir/utils/type_util.cc +++ b/xla/mlir/utils/type_util.cc @@ -21,9 +21,9 @@ limitations under the License. #include "mlir/IR/Types.h" #include "mlir/Support/LLVM.h" #include "xla/primitive_util.h" +#include "xla/tsl/platform/statusor.h" #include "xla/util.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/mlir/utils/type_util_test.cc b/xla/mlir/utils/type_util_test.cc index 26c5a0b269614f..0c40af4c2be626 100644 --- a/xla/mlir/utils/type_util_test.cc +++ b/xla/mlir/utils/type_util_test.cc @@ -25,8 +25,8 @@ limitations under the License. #include "mlir/IR/BuiltinTypes.h" #include "mlir/IR/MLIRContext.h" #include "xla/primitive_util.h" +#include "xla/tsl/platform/statusor.h" #include "xla/xla_data.pb.h" -#include "tsl/platform/statusor.h" namespace xla { namespace {