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: 720223479
  • Loading branch information
ddunl authored and Google-ML-Automation committed Jan 27, 2025
1 parent 85234bd commit d3236dd
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 43 deletions.
6 changes: 3 additions & 3 deletions xla/python/ifrt/hlo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -40,7 +41,6 @@ cc_library(
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@stablehlo//:stablehlo_serialization",
"@tsl//tsl/platform:statusor",
],
alwayslink = True,
)
Expand All @@ -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",
Expand All @@ -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",
],
)
2 changes: 1 addition & 1 deletion xla/python/ifrt/hlo/hlo_program_serdes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions xla/python/ifrt/hlo/hlo_program_serdes_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
16 changes: 8 additions & 8 deletions xla/python/ifrt/ir/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand All @@ -203,14 +203,14 @@ 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",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:string_view",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:IR",
"@tsl//tsl/platform:statusor",
],
)

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

Expand All @@ -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",
Expand All @@ -267,7 +268,6 @@ cc_library(
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@tsl//tsl/platform:statusor",
],
alwayslink = True,
)
Expand All @@ -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",
],
)

Expand Down Expand Up @@ -484,13 +484,13 @@ 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",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:MLIRBindingsPythonHeaders",
"@pybind11",
"@pybind11_abseil//pybind11_abseil:absl_casters",
"@tsl//tsl/platform:statusor",
],
)
2 changes: 1 addition & 1 deletion xla/python/ifrt/ir/ifrt_ir_program.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/python/ifrt/ir/ifrt_ir_program_serdes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions xla/python/ifrt/ir/ifrt_ir_program_serdes_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions xla/python/ifrt/ir/ifrt_ir_program_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/python/ifrt/ir/ir_py.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/python/ifrt/ir/sharding_param.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions xla/python/ifrt/ir/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -108,8 +110,6 @@ cc_library(
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@stablehlo//:version",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test",
],
)

Expand All @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion xla/python/ifrt/ir/tests/executable_impl_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/python/ifrt/ir/tests/executable_impl_test_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions xla/python/ifrt/ir/tests/executable_impl_test_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions xla/python/ifrt/ir/transforms/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions xla/python/ifrt/support/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)
4 changes: 2 additions & 2 deletions xla/python/ifrt/support/sharding_conversions_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d3236dd

Please sign in to comment.