From dd7d31fa7bfa357e58987c2f3881d99c8050b6de Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 10 Oct 2018 02:29:11 -0700 Subject: Change user_set to an absl::flat_hash_set in HloInstruction. absl::flat_hash_set have better performance than a std::unordered_set, which can improve overall compile time. PiperOrigin-RevId: 216498767 --- tensorflow/compiler/xla/service/hlo_instruction.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/compiler/xla/service/hlo_instruction.h b/tensorflow/compiler/xla/service/hlo_instruction.h index 93ff04b1e4..81fe1d0a9a 100644 --- a/tensorflow/compiler/xla/service/hlo_instruction.h +++ b/tensorflow/compiler/xla/service/hlo_instruction.h @@ -28,11 +28,10 @@ limitations under the License. #include #include #include -#include -#include #include #include "absl/container/flat_hash_map.h" +#include "absl/container/flat_hash_set.h" #include "absl/container/inlined_vector.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" @@ -1645,7 +1644,7 @@ class HloInstruction { // members. The set enables fast membership testing and the vector enables // fast, stable iteration. std::vector users_; - std::unordered_set user_set_; + absl::flat_hash_set user_set_; // The set of control successors of this instruction. std::vector control_successors_; -- cgit v1.2.3