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

Method DropAllControlDeps

tensorflow/compiler/xla/service/hlo_instruction.cc:1850–1862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1848}
1849
1850Status HloInstruction::DropAllControlDeps() {
1851 for (auto* ctrl_succ : control_successors_) {
1852 TF_RETURN_IF_ERROR(
1853 EraseElementFromVector(&ctrl_succ->control_predecessors_, this));
1854 }
1855 for (auto* ctrl_pred : control_predecessors_) {
1856 TF_RETURN_IF_ERROR(
1857 EraseElementFromVector(&ctrl_pred->control_successors_, this));
1858 }
1859 control_successors_.clear();
1860 control_predecessors_.clear();
1861 return Status::OK();
1862}
1863
1864Status HloInstruction::CopyAllControlDepsFrom(const HloInstruction* inst) {
1865 for (auto* ctrl_pred : inst->control_predecessors()) {

Callers 5

RunMethod · 0.80
RunMethod · 0.80
SimplifyGraphMethod · 0.80
ExpandInstructionMethod · 0.80

Calls 2

EraseElementFromVectorFunction · 0.85
clearMethod · 0.45

Tested by 1

RunMethod · 0.64