diff --git a/tensorflow/stream_executor/BUILD b/tensorflow/stream_executor/BUILD index 37b426a711d..33ef97f6712 100644 --- a/tensorflow/stream_executor/BUILD +++ b/tensorflow/stream_executor/BUILD @@ -92,7 +92,6 @@ cc_library( "//tensorflow/stream_executor/lib", "//tensorflow/stream_executor/platform", "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", @@ -141,7 +140,6 @@ cc_library( "//tensorflow/stream_executor/lib", "//tensorflow/stream_executor/platform", "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", @@ -353,7 +351,6 @@ cc_library( "//tensorflow/stream_executor/lib", "//tensorflow/stream_executor/platform", "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", @@ -492,7 +489,6 @@ cc_library( "//tensorflow/stream_executor/lib", "//tensorflow/stream_executor/platform", "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", @@ -532,7 +528,6 @@ cc_library( "//tensorflow/stream_executor/platform", "//third_party/eigen3", "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", @@ -584,7 +579,6 @@ cc_library( "//tensorflow/stream_executor/lib", "//tensorflow/stream_executor/platform", "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/synchronization", diff --git a/tensorflow/stream_executor/stream_executor_pimpl.h b/tensorflow/stream_executor/stream_executor_pimpl.h index ce14a7f4a43..f19c76c3790 100644 --- a/tensorflow/stream_executor/stream_executor_pimpl.h +++ b/tensorflow/stream_executor/stream_executor_pimpl.h @@ -23,7 +23,6 @@ limitations under the License. #include #include "absl/base/macros.h" -#include "absl/container/flat_hash_set.h" #include "absl/memory/memory.h" #include "absl/synchronization/mutex.h" #include "absl/types/optional.h" @@ -520,7 +519,9 @@ class StreamExecutor { std::vector streams; { absl::MutexLock lock(&mu_); - absl::c_copy(streams_, std::back_inserter(streams)); + for (Stream *stream : streams_) { + streams.push_back(stream); + } } for (Stream *stream : streams) { @@ -760,7 +761,7 @@ class StreamExecutor { StreamExecutorMemoryAllocator allocator_; // Set of streams associated with this stream executor. - absl::flat_hash_set streams_ TF_GUARDED_BY(mu_); + std::set streams_ TF_GUARDED_BY(mu_); SE_DISALLOW_COPY_AND_ASSIGN(StreamExecutor); };