Perform first the decomposition and then the ATen function to catch in-place modifications (#92243)
Addresses https://github.com/pytorch/pytorch/pull/91672#discussion_r1070412867
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92243
Approved by: https://github.com/ezyang