diff --git a/tensorflow/stream_executor/tpu/BUILD b/tensorflow/stream_executor/tpu/BUILD index 06165e90330..66b0013512f 100644 --- a/tensorflow/stream_executor/tpu/BUILD +++ b/tensorflow/stream_executor/tpu/BUILD @@ -48,7 +48,7 @@ cc_library( "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:xla_data_proto_cc", "//tensorflow/compiler/xla/service:shaped_buffer", - "//tensorflow/stream_executor:stream", + "//tensorflow/stream_executor:device_memory", "@com_google_absl//absl/container:inlined_vector", ], ) @@ -83,7 +83,7 @@ cc_library( "//tensorflow/core:lib", "//tensorflow/core/platform:types", "//tensorflow/core/tpu:tpu_api", - "//tensorflow/stream_executor:stream", + "//tensorflow/stream_executor", "//tensorflow/stream_executor/lib", "@com_google_absl//absl/container:flat_hash_map", ], @@ -139,7 +139,7 @@ cc_library( "//tensorflow/compiler/xla/service:shaped_buffer", "//tensorflow/compiler/xla/service:transfer_manager", "//tensorflow/core/tpu:tpu_api", - "//tensorflow/stream_executor:stream", + "//tensorflow/stream_executor", ], ) @@ -165,17 +165,6 @@ cc_library( "//tensorflow/core/platform:types", "//tensorflow/stream_executor:multi_platform_manager", "//tensorflow/stream_executor:stream_executor_headers", - "//tensorflow/stream_executor:stream_executor_pimpl", - ], -) - -cc_library( - name = "tpu_stream_interface", - hdrs = ["tpu_stream_interface.h"], - visibility = ["//visibility:public"], - deps = [ - "//tensorflow/stream_executor:device_memory", - "//tensorflow/stream_executor:stream_executor_internal", ], ) @@ -185,8 +174,16 @@ cc_library( visibility = ["//visibility:public"], deps = [ ":tpu_platform_interface", - "//tensorflow/core/platform:errors", - "//tensorflow/stream_executor:stream_executor_internal", - "//tensorflow/stream_executor:stream_header", + "//tensorflow/stream_executor:stream_executor_headers", + "//tensorflow/stream_executor/lib", + ], +) + +cc_library( + name = "tpu_stream_interface", + hdrs = ["tpu_stream_interface.h"], + visibility = ["//visibility:public"], + deps = [ + "//tensorflow/stream_executor:stream_executor_headers", ], ) diff --git a/tensorflow/stream_executor/tpu/tpu_executor_interface.h b/tensorflow/stream_executor/tpu/tpu_executor_interface.h index 5b00f615ca7..d3145b140b8 100644 --- a/tensorflow/stream_executor/tpu/tpu_executor_interface.h +++ b/tensorflow/stream_executor/tpu/tpu_executor_interface.h @@ -16,13 +16,11 @@ limitations under the License. #ifndef TENSORFLOW_STREAM_EXECUTOR_TPU_TPU_EXECUTOR_INTERFACE_H_ #define TENSORFLOW_STREAM_EXECUTOR_TPU_TPU_EXECUTOR_INTERFACE_H_ -#include "tensorflow/core/platform/errors.h" +#include + #include "tensorflow/stream_executor/device_memory.h" -#include "tensorflow/stream_executor/event.h" -#include "tensorflow/stream_executor/stream.h" -#include "tensorflow/stream_executor/stream_executor.h" +#include "tensorflow/stream_executor/lib/statusor.h" #include "tensorflow/stream_executor/stream_executor_internal.h" -#include "tensorflow/stream_executor/timer.h" #include "tensorflow/stream_executor/tpu/tpu_platform_interface.h" namespace tpu { @@ -33,11 +31,10 @@ namespace tensorflow { namespace tpu { class TpuExecutorInterface - : public ::stream_executor::internal::StreamExecutorInterface { + : public stream_executor::internal::StreamExecutorInterface { public: - using Status = ::stream_executor::port::Status; template - using StatusOr = ::stream_executor::port::StatusOr; + using StatusOr = stream_executor::port::StatusOr; class TemporaryDeviceMemory { public: diff --git a/tensorflow/stream_executor/tpu/tpu_stream_interface.h b/tensorflow/stream_executor/tpu/tpu_stream_interface.h index aa281cdb58c..4b56f75a369 100644 --- a/tensorflow/stream_executor/tpu/tpu_stream_interface.h +++ b/tensorflow/stream_executor/tpu/tpu_stream_interface.h @@ -17,6 +17,7 @@ limitations under the License. #define TENSORFLOW_STREAM_EXECUTOR_TPU_TPU_STREAM_INTERFACE_H_ #include "tensorflow/stream_executor/device_memory.h" +#include "tensorflow/stream_executor/stream_executor.h" #include "tensorflow/stream_executor/stream_executor_internal.h" namespace tensorflow {