[XLA] Fix VLOG interaction with CallInliner

PiperOrigin-RevId: 350446538
Change-Id: I5633497e4f89687c01d7b8a306e847ea27cf4f0a
This commit is contained in:
David Majnemer 2021-01-06 16:07:40 -08:00 committed by TensorFlower Gardener
parent 7d6722dcb4
commit 5eb2fd2824
2 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,6 @@ class SubcomputationInsertionVisitor : public DfsHloVisitorWithDefault {
TF_ASSIGN_OR_RETURN(HloInstruction * new_root, Resolve(root));
VLOG(1) << "Replacing all uses of " << call_->ToString()
<< " with new root " << new_root->ToString();
call_->ClearCalledComputations();
return outer_->ReplaceInstruction(call_, new_root);
}

View File

@ -320,6 +320,7 @@ Status HloComputation::RemoveInstructionImpl(HloInstruction* instruction,
to_be_deleted_.back()->DetachFromOperandsAndUsers();
// Clear all operands to avoid Null operands.
to_be_deleted_.back()->RemoveAllOperands();
to_be_deleted_.back()->ClearCalledComputations();
to_be_deleted_.back()->MarkAsDead();
instructions_.erase(inst_it->second);
instruction_iterators_.erase(inst_it);