diff options
author | Benjamin Kramer <kramerb@google.com> | 2018-10-01 13:43:49 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-01 13:53:07 -0700 |
commit | 3039a4694e22674b502257ae34b0a5b614a631f3 (patch) | |
tree | 423fdfa7a2e7dd2740af97accfe848bc97b335d0 /tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc | |
parent | 44acd839c57494860666c799afd24360f1df3bed (diff) |
[XLA] Migrate from gtl::FlatMap to absl::flat_hash_map
PiperOrigin-RevId: 215272497
Diffstat (limited to 'tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc b/tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc index e8fe33e626..2590473c77 100644 --- a/tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc +++ b/tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc @@ -15,17 +15,17 @@ limitations under the License. #include "tensorflow/compiler/xla/service/while_loop_invariant_code_motion.h" #include "absl/algorithm/container.h" +#include "absl/container/flat_hash_map.h" #include "absl/container/inlined_vector.h" #include "tensorflow/compiler/xla/service/tuple_util.h" #include "tensorflow/compiler/xla/service/while_util.h" #include "tensorflow/compiler/xla/util.h" -#include "tensorflow/core/lib/gtl/flatmap.h" #include "tensorflow/core/lib/gtl/flatset.h" namespace xla { +using absl::flat_hash_map; using absl::InlinedVector; -using tensorflow::gtl::FlatMap; using tensorflow::gtl::FlatSet; // Copies `to_hoist` to the computation containing `while_instr`, hoisting its @@ -34,7 +34,7 @@ using tensorflow::gtl::FlatSet; // function hoists the operands in `unhoisted_invariant_instructions` and moves // them into `hoisted_instructions`. static void CreateLoopInvariantCopy( - FlatMap<HloInstruction*, HloInstruction*>* hoisted_instructions, + flat_hash_map<HloInstruction*, HloInstruction*>* hoisted_instructions, FlatSet<HloInstruction*>* unhoisted_invariant_instructions, HloInstruction* while_instr, HloInstruction* to_hoist) { HloComputation* parent_of_while = while_instr->parent(); @@ -147,7 +147,7 @@ WhileLoopInvariantCodeMotion::TryHoistingInvariantInstructionsFromWhileBody( // Maps instructions in the while body to instructions hoisted outside the // while that compute the same value. - FlatMap<HloInstruction*, HloInstruction*> hoisted_instructions; + flat_hash_map<HloInstruction*, HloInstruction*> hoisted_instructions; // Contains instructions that can be legally hoisted, but were deemed to be // unprofitable to be hoisted alone by NotWorthHoistingIndividually. When we |