diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-10-10 02:29:11 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-10 02:32:48 -0700 |
commit | dd7d31fa7bfa357e58987c2f3881d99c8050b6de (patch) | |
tree | c05fc0c84b42bc11bd0aec4ee155c5fe36116cad | |
parent | ee7c9597f4ab8e586e921f9fe3e3c1383417169c (diff) |
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
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_instruction.h | 5 |
1 files 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 <set> #include <string> #include <tuple> -#include <unordered_map> -#include <unordered_set> #include <vector> #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<HloInstruction*> users_; - std::unordered_set<const HloInstruction*> user_set_; + absl::flat_hash_set<const HloInstruction*> user_set_; // The set of control successors of this instruction. std::vector<HloInstruction*> control_successors_; |