The idea is that since add_ is an inplace operation, in this case, y will be modified inplace and so the gradient computation for the tanh operation won’t be able to be performed.
This code snipped should cause an error during the backward pass. All these potential problems are tracked properly, so if no error is raised, the operation is valid and the result will be correct.