pytorch
84a302e5 - Remove wrong internal assert in handle_view_on_rebase (#88243)

Commit
2 years ago
Remove wrong internal assert in handle_view_on_rebase (#88243) Fixes: https://github.com/pytorch/pytorch/issues/88205 The `CreationMeta::NO_GRAD_MODE` path in handle_view_on_rebase wrongly assumes that the tensor would be a leaf, because tensors created in no_grad are always leaf tensors. However, due to creation_meta propagation, a view of a view created in no_grad also has `CreationMeta::NO_GRAD_MODE`, but DOES have grad_fn. Pull Request resolved: https://github.com/pytorch/pytorch/pull/88243 Approved by: https://github.com/albanD
Author
Committer
Parents
Loading