Skip to content

Commit

Permalink
Update users of TSL headers and targets to new location in XLA
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ddunl authored and Google-ML-Automation committed Jan 23, 2025
1 parent e9a1a97 commit 06fca59
Show file tree
Hide file tree
Showing 24 changed files with 61 additions and 56 deletions.
12 changes: 6 additions & 6 deletions xla/backends/cpu/runtime/xnnpack/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)
Expand Down
2 changes: 1 addition & 1 deletion xla/backends/cpu/runtime/xnnpack/object_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion xla/backends/cpu/runtime/xnnpack/xnn_interop.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion xla/backends/cpu/runtime/xnnpack/xnn_threadpool_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
13 changes: 7 additions & 6 deletions xla/backends/gpu/collectives/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand All @@ -58,14 +58,14 @@ 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",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:span",
"@tsl//tsl/platform:casts",
"@tsl//tsl/platform:logging",
],
)

Expand All @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand Down
2 changes: 1 addition & 1 deletion xla/backends/gpu/collectives/gpu_clique.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion xla/backends/gpu/collectives/gpu_clique_key.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion xla/backends/gpu/collectives/gpu_clique_key_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
6 changes: 3 additions & 3 deletions xla/backends/gpu/collectives/nccl_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions xla/backends/profiler/plugin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
)
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion xla/backends/profiler/plugin/plugin_tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion xla/backends/profiler/plugin/plugin_tracer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion xla/backends/profiler/plugin/plugin_tracer_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion xla/backends/profiler/plugin/profiler_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
22 changes: 12 additions & 10 deletions xla/hlo/translate/mhlo_to_hlo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand All @@ -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",
],
)

Expand Down Expand Up @@ -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",
Expand All @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand All @@ -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",
Expand All @@ -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",
],
)

Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/translate/mhlo_to_hlo/layout_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
6 changes: 3 additions & 3 deletions xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 06fca59

Please sign in to comment.