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: 719219664
  • Loading branch information
ddunl authored and Google-ML-Automation committed Jan 24, 2025
1 parent bdba0a9 commit fb8f386
Show file tree
Hide file tree
Showing 28 changed files with 70 additions and 66 deletions.
40 changes: 22 additions & 18 deletions xla/hlo/ir/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ cc_library(
"//xla/service:name_uniquer",
"//xla/tsl/lib/gtl:iterator_range",
"//xla/tsl/lib/gtl:map_util",
"//xla/tsl/platform:env",
"//xla/tsl/platform:errors",
"//xla/tsl/platform:logging",
"//xla/tsl/platform:status",
"//xla/tsl/platform:statusor",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
Expand All @@ -107,13 +112,8 @@ cc_library(
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/types:span",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:fingerprint",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:protobuf",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:statusor",
],
)

Expand All @@ -131,6 +131,8 @@ cc_library(
"//xla:status_macros",
"//xla:util",
"//xla:xla_data_proto_cc",
"//xla/tsl/platform:errors",
"//xla/tsl/platform:statusor",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_set",
Expand All @@ -139,9 +141,7 @@ cc_library(
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:protobuf",
"@tsl//tsl/platform:statusor",
],
)

Expand All @@ -164,13 +164,13 @@ xla_cc_test(
"//xla:xla_data_proto_cc",
"//xla/hlo/parser:hlo_parser",
"//xla/service:hlo_module_config",
"//xla/tsl/platform:status",
"//xla/tsl/platform:statusor",
"//xla/tsl/platform:test",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test",
],
)

Expand All @@ -180,11 +180,11 @@ cc_library(
hdrs = ["backend_config.h"],
deps = [
"//xla:util",
"//xla/tsl/platform:errors",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/synchronization",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:human_readable_json",
"@tsl//tsl/platform:protobuf",
],
Expand All @@ -197,10 +197,11 @@ xla_cc_test(
":backend_config",
"//xla/service/gpu:backend_configs_cc",
"//xla/tsl/lib/core:status_test_util",
"//xla/tsl/platform:test",
"//xla/tsl/platform:test_main",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/synchronization",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/platform:test",
],
)

Expand All @@ -213,10 +214,10 @@ cc_library(
"//xla:status_macros",
"//xla/service:hlo_module_config",
"//xla/service:hlo_proto_cc",
"//xla/tsl/platform:statusor",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@tsl//tsl/platform:statusor",
],
)

Expand All @@ -240,8 +241,9 @@ xla_cc_test(
":hlo_instruction_utils",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/utils:hlo_query",
"//xla/tsl/platform:test",
"//xla/tsl/platform:test_main",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/platform:test",
],
)

Expand All @@ -263,8 +265,8 @@ cc_library(
name = "ptrvec",
hdrs = ["ptrvec.h"],
deps = [
"//xla/tsl/platform:logging",
"@com_google_absl//absl/log:check",
"@tsl//tsl/platform:logging",
],
)

Expand All @@ -273,12 +275,13 @@ cc_test(
srcs = ["ptrvec_test.cc"],
deps = [
":ptrvec",
"//xla/tsl/platform:logging",
"//xla/tsl/platform:test",
"//xla/tsl/platform:test_benchmark",
"//xla/tsl/platform:test_main",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:test",
"@tsl//tsl/platform:test_benchmark",
],
)

Expand Down Expand Up @@ -306,6 +309,7 @@ xla_cc_test(
":hlo",
"//xla:xla_data_proto_cc",
"//xla/service:hlo_proto_cc",
"//xla/tsl/platform:test_main",
"@com_google_googletest//:gtest_main",
],
)
2 changes: 1 addition & 1 deletion xla/hlo/ir/backend_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ limitations under the License.
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/synchronization/mutex.h"
#include "xla/tsl/platform/errors.h"
#include "xla/util.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/human_readable_json.h"
#include "tsl/platform/protobuf.h"

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/backend_config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ limitations under the License.
#include "absl/synchronization/notification.h"
#include "xla/service/gpu/backend_configs.pb.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "tsl/platform/test.h"
#include "xla/tsl/platform/test.h"

namespace xla {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/collective_device_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ limitations under the License.
#include "absl/strings/str_join.h"
#include "absl/types/span.h"
#include "xla/service/hlo.pb.h"
#include "xla/tsl/platform/logging.h" // IWYU pragma: keep
#include "xla/xla_data.pb.h"
#include "tsl/platform/logging.h" // IWYU pragma: keep
#include "tsl/platform/protobuf.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/dfs_hlo_visitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ limitations under the License.
#include "absl/status/status.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/tsl/platform/logging.h"
#include "xla/util.h"
#include "tsl/platform/logging.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/dfs_hlo_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ limitations under the License.
#include "absl/types/span.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/literal.h"
#include "xla/tsl/platform/status.h"
#include "xla/types.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/status.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/dfs_hlo_visitor_with_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "tsl/platform/status.h"
#include "xla/tsl/platform/status.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/dynamic_parameter_binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "tsl/platform/errors.h"
#include "xla/tsl/platform/errors.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/hlo_casting_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <type_traits>

#include "xla/hlo/ir/hlo_instruction.h"
#include "tsl/platform/logging.h"
#include "xla/tsl/platform/logging.h"

namespace xla {

Expand Down
8 changes: 4 additions & 4 deletions xla/hlo/ir/hlo_computation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ limitations under the License.
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/logging.h"
#include "xla/tsl/platform/status.h"
#include "xla/tsl/platform/statusor.h"
#include "xla/util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/status.h"
#include "tsl/platform/statusor.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/hlo_computation.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ limitations under the License.
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "xla/tsl/platform/errors.h"
#include "xla/util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/errors.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/hlo_domain_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ limitations under the License.
#include "absl/container/flat_hash_set.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "xla/tsl/platform/status.h"
#include "xla/types.h"
#include "tsl/platform/status.h"

namespace xla {

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/ir/hlo_input_output_alias_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ limitations under the License.
#include "xla/shape_tree.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/logging.h" // IWYU pragma: keep
#include "xla/util.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h" // IWYU pragma: keep

namespace xla {

Expand Down
8 changes: 4 additions & 4 deletions xla/hlo/ir/hlo_instruction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ limitations under the License.
#include "xla/status_macros.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "xla/tsl/lib/gtl/map_util.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/logging.h" // IWYU pragma: keep
#include "xla/tsl/platform/status.h"
#include "xla/tsl/platform/statusor.h"
#include "xla/util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h" // IWYU pragma: keep
#include "tsl/platform/status.h"
#include "tsl/platform/statusor.h"

namespace xla {

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/ir/hlo_instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ limitations under the License.
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/logging.h" // IWYU pragma: keep
#include "xla/xla_data.pb.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h" // IWYU pragma: keep
#include "tsl/platform/protobuf.h"

namespace xla {
Expand Down
6 changes: 3 additions & 3 deletions xla/hlo/ir/hlo_instructions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ limitations under the License.
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/logging.h" // IWYU pragma: keep
#include "xla/tsl/platform/status.h"
#include "xla/util.h"
#include "xla/window_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h" // IWYU pragma: keep
#include "tsl/platform/protobuf.h"
#include "tsl/platform/status.h"

namespace xla {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/ir/hlo_instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ limitations under the License.
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "xla/tsl/platform/logging.h" // IWYU pragma: keep
#include "xla/tsl/platform/status.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/logging.h" // IWYU pragma: keep
#include "tsl/platform/status.h"

namespace xla {

Expand Down
10 changes: 5 additions & 5 deletions xla/hlo/ir/hlo_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ limitations under the License.
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/tsl/lib/gtl/map_util.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/logging.h"
#include "xla/tsl/platform/status.h"
#include "xla/tsl/platform/statusor.h"
#include "xla/util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/env.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/fingerprint.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/status.h"
#include "tsl/platform/statusor.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/hlo_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ limitations under the License.
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/tsl/lib/gtl/iterator_range.h"
#include "tsl/platform/logging.h"
#include "xla/tsl/platform/logging.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/ir/hlo_module_group.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ limitations under the License.
#include "xla/service/hlo.pb.h"
#include "xla/service/hlo_module_config.h"
#include "xla/status_macros.h"
#include "tsl/platform/statusor.h"
#include "xla/tsl/platform/statusor.h"

namespace xla {

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/ir/hlo_module_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ limitations under the License.
#include "absl/status/status.h"
#include "xla/service/hlo.pb.h"
#include "xla/service/metrics.pb.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/statusor.h"
#include "xla/util.h"
#include "tsl/platform/env.h"
#include "tsl/platform/protobuf.h"
#include "tsl/platform/statusor.h"

namespace xla {

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/ir/hlo_module_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ limitations under the License.
#include "absl/status/statusor.h"
#include "xla/service/hlo.pb.h"
#include "xla/status_macros.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/statusor.h"
#include "xla/util.h"
#include "tsl/platform/env.h"
#include "tsl/platform/protobuf.h"
#include "tsl/platform/statusor.h"

namespace xla {

Expand Down
Loading

0 comments on commit fb8f386

Please sign in to comment.