aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/allocation_tracker.h
diff options
context:
space:
mode:
authorGravatar Benjamin Kramer <kramerb@google.com>2018-10-01 13:43:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-01 13:53:07 -0700
commit3039a4694e22674b502257ae34b0a5b614a631f3 (patch)
tree423fdfa7a2e7dd2740af97accfe848bc97b335d0 /tensorflow/compiler/xla/service/allocation_tracker.h
parent44acd839c57494860666c799afd24360f1df3bed (diff)
[XLA] Migrate from gtl::FlatMap to absl::flat_hash_map
PiperOrigin-RevId: 215272497
Diffstat (limited to 'tensorflow/compiler/xla/service/allocation_tracker.h')
-rw-r--r--tensorflow/compiler/xla/service/allocation_tracker.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/allocation_tracker.h b/tensorflow/compiler/xla/service/allocation_tracker.h
index a7d8927cf7..af227fe4da 100644
--- a/tensorflow/compiler/xla/service/allocation_tracker.h
+++ b/tensorflow/compiler/xla/service/allocation_tracker.h
@@ -22,6 +22,7 @@ limitations under the License.
#include <string>
#include <vector>
+#include "absl/container/flat_hash_map.h"
#include "tensorflow/compiler/xla/service/backend.h"
#include "tensorflow/compiler/xla/statusor.h"
#include "tensorflow/compiler/xla/types.h"
@@ -110,7 +111,7 @@ class AllocationTracker {
// A map from device memory opaque value to allocation. One such map is
// maintained per device ordinal.
- using AllocationMap = tensorflow::gtl::FlatMap<const void*, Allocation>;
+ using AllocationMap = absl::flat_hash_map<const void*, Allocation>;
tensorflow::mutex mutex_;
@@ -146,7 +147,7 @@ class AllocationTracker {
// non-owning "view" into a tuple's sub-buffers. The sub-buffers are then
// free'd when both the view *and* the original tuple are Unregistered. This
// refcounting is managed in opaque_to_allocation_map_.
- tensorflow::gtl::FlatMap<int64, std::vector<std::unique_ptr<ShapedBuffer>>>
+ absl::flat_hash_map<int64, std::vector<std::unique_ptr<ShapedBuffer>>>
handle_to_shaped_buffers_ GUARDED_BY(mutex_);
TF_DISALLOW_COPY_AND_ASSIGN(AllocationTracker);