MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Run

Method Run

tensorflow/compiler/xla/service/scatter_expander.cc:411–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411StatusOr<bool> ScatterExpander::Run(HloModule* module) {
412 std::vector<HloInstruction*> scatter_instrs;
413 for (HloComputation* computation : module->MakeNonfusionComputations()) {
414 for (HloInstruction* instr : computation->instructions()) {
415 if (instr->opcode() == HloOpcode::kScatter) {
416 scatter_instrs.push_back(instr);
417 }
418 }
419 }
420
421 for (auto instr : scatter_instrs) {
422 TF_ASSIGN_OR_RETURN(HloInstruction * expanded_root, ExpandScatter(instr));
423 TF_RETURN_IF_ERROR(
424 instr->parent()->ReplaceInstruction(instr, expanded_root));
425 }
426
427 return !scatter_instrs.empty();
428}
429
430} // namespace xla

Callers

nothing calls this directly

Calls 8

instructionsMethod · 0.80
opcodeMethod · 0.80
TF_ASSIGN_OR_RETURNFunction · 0.70
push_backMethod · 0.45
ReplaceInstructionMethod · 0.45
parentMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected