Skip to content

Commit

Permalink
defensive program
Browse files Browse the repository at this point in the history
  • Loading branch information
BowenBao committed Jan 29, 2021
1 parent 64fde2a commit 1cc7997
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torch/csrc/jit/passes/onnx/remove_inplace_ops_for_onnx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ static void PrepareForRemoveMutations(MutationRemover& mr, Block* b) {
b->prependNode(newNode);
noneNode->insertBefore(newNode);
}
TORCH_INTERNAL_ASSERT(nullptr != newNode);
node->replaceInput(index, newNode->output());
input->replaceAllUsesAfterNodeWith(node, newNode->output());
}
Expand Down

0 comments on commit 1cc7997

Please sign in to comment.