diff options
author | 2018-08-20 16:07:12 -0700 | |
---|---|---|
committer | 2018-08-20 16:18:21 -0700 | |
commit | 65b9ed5a83319830db02504d4c69e98bd07665b6 (patch) | |
tree | 7606d62d577790774274bcb9dbb09aea5b42a620 /tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc | |
parent | e687764a94abc17866213d505d1dbe5e4873e1b9 (diff) |
[XLA] Switch to absl versions of the c_foo functions.
PiperOrigin-RevId: 209502513
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 | 15 |
1 files changed, 8 insertions, 7 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 09ddcffb22..cb132d4f16 100644 --- a/tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc +++ b/tensorflow/compiler/xla/service/while_loop_invariant_code_motion.cc @@ -14,6 +14,7 @@ limitations under the License. ==============================================================================*/ #include "tensorflow/compiler/xla/service/while_loop_invariant_code_motion.h" +#include "absl/algorithm/container.h" #include "tensorflow/compiler/xla/service/tuple_util.h" #include "tensorflow/compiler/xla/service/while_util.h" #include "tensorflow/compiler/xla/util.h" @@ -65,8 +66,8 @@ static void CreateLoopInvariantCopy( }; InlinedVector<HloInstruction*, 4> new_operands; - c_transform(old_instruction->operands(), std::back_inserter(new_operands), - get_new_operand); + absl::c_transform(old_instruction->operands(), + std::back_inserter(new_operands), get_new_operand); HloInstruction* new_instruction = parent_of_while->AddInstruction(old_instruction->CloneWithNewOperands( @@ -197,7 +198,7 @@ WhileLoopInvariantCodeMotion::TryHoistingInvariantInstructionsFromWhileBody( op->opcode() == HloOpcode::kConstant; }; - if (!c_all_of(instruction->operands(), is_invariant)) { + if (!absl::c_all_of(instruction->operands(), is_invariant)) { continue; } @@ -257,10 +258,10 @@ StatusOr<bool> WhileLoopInvariantCodeMotion::Run(HloModule* module) { bool changed = false; std::vector<HloInstruction*> while_instrs; for (auto* comp : module->computations()) { - c_copy_if(comp->instructions(), std::back_inserter(while_instrs), - [](const HloInstruction* instr) { - return instr->opcode() == HloOpcode::kWhile; - }); + absl::c_copy_if(comp->instructions(), std::back_inserter(while_instrs), + [](const HloInstruction* instr) { + return instr->opcode() == HloOpcode::kWhile; + }); } for (HloInstruction* while_instr : while_instrs) { |