diff --git a/tensorflow/compiler/mlir/tensorflow/BUILD b/tensorflow/compiler/mlir/tensorflow/BUILD index 28b94818567..7448ecc4df8 100644 --- a/tensorflow/compiler/mlir/tensorflow/BUILD +++ b/tensorflow/compiler/mlir/tensorflow/BUILD @@ -567,7 +567,6 @@ cc_library( hdrs = ["utils/error_util.h"], deps = [ "//tensorflow/core:lib", - "//tensorflow/stream_executor/lib", "@llvm//:support", "@local_config_mlir//:IR", ], diff --git a/tensorflow/compiler/mlir/tensorflow/utils/error_util.h b/tensorflow/compiler/mlir/tensorflow/utils/error_util.h index 198d04e0486..a60d90cbfb7 100644 --- a/tensorflow/compiler/mlir/tensorflow/utils/error_util.h +++ b/tensorflow/compiler/mlir/tensorflow/utils/error_util.h @@ -22,13 +22,11 @@ limitations under the License. #include "mlir/IR/Location.h" // TF:local_config_mlir #include "mlir/IR/MLIRContext.h" // TF:local_config_mlir #include "tensorflow/core/lib/core/status.h" -#include "tensorflow/stream_executor/lib/statusor.h" // Error utilities for MLIR when interacting with code using Status returns. namespace mlir { // TensorFlow's Status is used for error reporting back to callers. -using stream_executor::port::StatusOr; using tensorflow::Status; // Diagnostic handler that collects all the diagnostics reported and can produce diff --git a/tensorflow/compiler/mlir/xla/BUILD b/tensorflow/compiler/mlir/xla/BUILD index 6a617206823..bf71bcda776 100644 --- a/tensorflow/compiler/mlir/xla/BUILD +++ b/tensorflow/compiler/mlir/xla/BUILD @@ -408,6 +408,7 @@ cc_library( "//tensorflow/compiler/xla/client:xla_builder", "//tensorflow/compiler/xla/client/lib:matrix", "//tensorflow/compiler/xla/service:hlo", + "//tensorflow/stream_executor/lib", "@llvm//:support", "@local_config_mlir//:Analysis", "@local_config_mlir//:IR", diff --git a/tensorflow/compiler/mlir/xla/mlir_hlo_to_hlo.cc b/tensorflow/compiler/mlir/xla/mlir_hlo_to_hlo.cc index e9bf3bac44b..935ddac2b67 100644 --- a/tensorflow/compiler/mlir/xla/mlir_hlo_to_hlo.cc +++ b/tensorflow/compiler/mlir/xla/mlir_hlo_to_hlo.cc @@ -40,7 +40,9 @@ limitations under the License. #include "tensorflow/compiler/xla/service/hlo_module.h" #include "tensorflow/compiler/xla/status_macros.h" #include "tensorflow/compiler/xla/xla_data.pb.h" +#include "tensorflow/stream_executor/lib/statusor.h" +using ::stream_executor::port::StatusOr; using ::tensorflow::int16; using ::tensorflow::int32; using ::tensorflow::int64;