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: 719070155
  • Loading branch information
ddunl authored and tensorflower-gardener committed Jan 24, 2025
1 parent 4ff283b commit fcb7912
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/lite/metrics/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ tf_cc_test(
"@llvm-project//mlir:Parser",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/tsl/platform:statusor",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ limitations under the License.
#include "tensorflow/compiler/mlir/lite/metrics/error_collector.h"
#include "tensorflow/compiler/mlir/lite/metrics/types_util.h"
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_dialect.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/platform/errors.h"
#include "tensorflow/core/platform/resource_loader.h"
#include "tensorflow/core/platform/test.h"
#include "tsl/platform/statusor.h"

namespace mlir {
namespace TFL {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/lite/quantization/lite/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ tf_cc_test(
"@com_google_absl//absl/status",
"@com_google_googletest//:gtest",
"@flatbuffers",
"@local_tsl//tsl/platform:logging",
"@local_xla//xla/tsl/platform:logging",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ limitations under the License.
#include "tensorflow/compiler/mlir/lite/quantization/lite/test_util.h"
#include "tensorflow/compiler/mlir/lite/schema/schema_generated.h"
#include "tensorflow/compiler/mlir/lite/schema/schema_utils.h"
#include "xla/tsl/platform/logging.h"
#include "tensorflow/core/platform/init_main.h"
#include "tensorflow/core/platform/path.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/util/command_line_flags.h"
#include "tsl/platform/logging.h"

// Note: branched from tensorflow/lite/tools/optimize/quantize_weights_test.cc

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/lite/quantization/stablehlo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ tf_cc_test(
"@com_google_absl//absl/status:statusor",
"@com_google_googletest//:gtest_main",
"@llvm-project//mlir:IR",
"@local_tsl//tsl/platform:status_matchers",
"@local_xla//xla/tsl/platform:status_matchers",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
#include "tensorflow/cc/saved_model/loader.h"
#include "tensorflow/compiler/mlir/quantization/stablehlo/cc/io.h"
#include "tensorflow/compiler/mlir/quantization/stablehlo/quantization_config.pb.h"
#include "tsl/platform/status_matchers.h"
#include "xla/tsl/platform/status_matchers.h"

namespace tensorflow {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/compiler/mlir/tensorflow/c/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ tf_cuda_library(
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/tsl/platform:errors",
"@local_xla//xla/tsl/platform:statusor",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ limitations under the License.
#include "tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.h"
#include "tensorflow/compiler/mlir/tensorflow/utils/error_util.h"
#include "tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/framework/full_type.pb.h"
#include "tensorflow/core/framework/function.h"
#include "tensorflow/core/framework/function.pb.h"
Expand All @@ -69,8 +71,6 @@ limitations under the License.
#include "tensorflow/core/lib/llvm_rtti/llvm_rtti.h"
#include "tensorflow/core/platform/errors.h"
#include "tensorflow/core/platform/refcount.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"

namespace mlir {
namespace TF {
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/compiler/mlir/tensorflow_to_stablehlo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ cc_library(
"@llvm-project//mlir:Parser",
"@llvm-project//mlir:Support",
"@llvm-project//mlir:Transforms",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/tsl/platform:errors",
"@local_xla//xla/tsl/platform:statusor",
],
alwayslink = True,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ limitations under the License.
#include "tensorflow/compiler/mlir/quantization/stablehlo/cc/saved_model_import.h"
#include "tensorflow/compiler/mlir/quantization/tensorflow/quantize_preprocess.h"
#include "tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/public/session.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"

namespace mlir {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/tf2xla/internal/inference/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ tf_cc_test(
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:Support",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/tsl/platform:statusor",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ limitations under the License.
#include "mlir/Support/LogicalResult.h" // from @llvm-project
#include "tensorflow/compiler/mlir/tf2xla/internal/inference/inference_passes.h"
#include "tensorflow/compiler/mlir/tf2xla/transforms/test_utils.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/lib/monitoring/cell_reader.h"
#include "tsl/platform/statusor.h"

namespace mlir {
namespace tf2xla {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/tf2xla/internal/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ cc_library(
"@com_google_absl//absl/strings:string_view",
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
"@local_tsl//tsl/platform:errors",
"@local_xla//xla:shape_util",
"@local_xla//xla/hlo/translate/mhlo_to_hlo:type_to_shape",
"@local_xla//xla/mlir_hlo:hlo_dialect_registration",
"@local_xla//xla/tsl/platform:errors",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ limitations under the License.
#include "xla/hlo/translate/mhlo_to_hlo/type_to_shape.h"
#include "xla/mlir_hlo/mhlo/IR/register.h"
#include "xla/shape.h"
#include "xla/tsl/platform/errors.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/protobuf/tpu/compile_metadata.pb.h"
#include "tsl/platform/errors.h"

namespace tensorflow {
namespace tf2xla {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/tf2xla/tests/registration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ cc_library(
"@llvm-project//mlir:Support",
"@llvm-project//mlir:TranslateLib",
"@local_tsl//tsl/platform:protobuf",
"@local_tsl//tsl/platform:status",
"@local_xla//xla/client:client_library",
"@local_xla//xla/client:compile_only_client",
"@local_xla//xla/service/cpu:cpu_compiler",
"@local_xla//xla/service/cpu:cpu_transfer_manager",
"@local_xla//xla/stream_executor:platform_manager",
"@local_xla//xla/stream_executor/host:host_platform",
"@local_xla//xla/stream_executor/host:host_platform_id",
"@local_xla//xla/tsl/platform:status",
],
alwayslink = 1,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ limitations under the License.
#include "xla/client/compile_only_client.h"
#include "xla/stream_executor/host/host_platform_id.h"
#include "xla/stream_executor/platform_manager.h"
#include "xla/tsl/platform/status.h"
#include "tensorflow/core/common_runtime/graph_constructor.h"
#include "tensorflow/core/framework/function.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/types.h"
#include "tsl/platform/protobuf.h"
#include "tsl/platform/status.h"

namespace tensorflow {
namespace tf2xla {
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ limitations under the License.
#include "tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.h"
#include "tensorflow/compiler/mlir/tfr/ir/tfr_ops.h"
#include "tensorflow/compiler/mlir/tfr/passes/passes.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/node_def_util.h"
Expand All @@ -65,8 +67,6 @@ limitations under the License.
#include "tensorflow/core/platform/stringpiece.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/util/env_var.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"

namespace tensorflow {
namespace tfr {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ limitations under the License.
#include "mlir/IR/MLIRContext.h" // from @llvm-project
#include "mlir/Pass/PassManager.h" // from @llvm-project
#include "tensorflow/compiler/mlir/tensorflow/translate/mlir_roundtrip_flags.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/stringpiece.h"
#include "tsl/platform/statusor.h"

namespace tensorflow {
namespace tfr {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/mlir/tfrt/tests/saved_model/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tf_cc_test(
"@llvm-project//llvm:Support",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:Parser",
"@local_tsl//tsl/platform:statusor",
"@local_xla//xla/tsl/platform:statusor",
"@tf_runtime//:bef",
"@tf_runtime//:hostcontext",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ limitations under the License.
#include "tensorflow/compiler/mlir/tfrt/translate/import_model.h"
#include "tensorflow/compiler/mlir/tfrt/translate/tfrt_compile_options.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/types.pb.h"
Expand All @@ -41,7 +42,6 @@ limitations under the License.
#include "tensorflow/core/tfrt/fallback/fallback_state.h"
#include "tensorflow/core/tfrt/graph_executor/graph_execution_options.h"
#include "tensorflow/core/tfrt/runtime/runtime.h"
#include "tsl/platform/statusor.h"
#include "tfrt/bef/bef_buffer.h" // from @tf_runtime
#include "tfrt/host_context/resource_context.h" // from @tf_runtime

Expand Down
4 changes: 2 additions & 2 deletions tensorflow/compiler/mlir/tools/kernel_gen/hlo_to_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
#include "tensorflow/compiler/mlir/init_mlir.h"
#include "tensorflow/compiler/mlir/tools/kernel_gen/kernel_creator.h"
#include "xla/service/llvm_ir/llvm_command_line_options.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/status.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"

namespace tensorflow {
namespace kernel_gen {
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/compiler/mlir/tools/kernel_gen/kernel_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ limitations under the License.
#include "xla/mlir_hlo/mhlo/transforms/passes.h"
#include "xla/mlir_hlo/transforms/gpu_passes.h"
#include "xla/mlir_hlo/transforms/passes.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/statusor.h"
#include "tensorflow/core/platform/errors.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/statusor.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/statusor.h"

namespace tensorflow {
namespace kernel_gen {
Expand Down

0 comments on commit fcb7912

Please sign in to comment.