Add a reshape_copy operator. (#88314)

The semantics is "as if" you did a reshape, but it always copied
even if the input was directly view'able.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88314
Approved by: https://github.com/albanD
This commit is contained in:
Edward Z. Yang
2022-11-02 20:44:18 -07:00
committed by PyTorch MergeBot
parent 86c7cd287c
commit 2f296cfdbb
5 changed files with 28 additions and 0 deletions

View File

@ -124,6 +124,7 @@ _SKIP_PYTHON_BINDINGS = [
"_local_scalar_dense",
"to",
"_to_copy",
"_reshape_copy",
"copy_sparse_to_sparse_",
"copy_",
"numpy_T",