[reland] Update custom Function preserve torch function when inputs r… (#110679)
…eturned as-is
reland of https://github.com/pytorch/pytorch/pull/109825#issuecomment-1749803837
Opening this without ghstack to do codev. In our PR, we changed the signature of `_wrap_outputs`. There is some internal code that calls `_wrap_outputs` directly, so we also need to update that callsite.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110679
Approved by: https://github.com/albanD