pytorch
4b9ba3fa - Allow discontiguous NestedTensors to empty_like (#98383)

Commit
2 years ago
Allow discontiguous NestedTensors to empty_like (#98383) # Summary Preivously we disallowd dis-contiguous NTs to passed into to empty_like. This was done out of an abundance of caution, :think:. However it should be safe to create an empty NT for dis-contiguous NTs. Empty like does account for offsets, strides, and sizes in construction of the result and therefore this should be safe. Pull Request resolved: https://github.com/pytorch/pytorch/pull/98383 Approved by: https://github.com/cpuhrsch
Author
Committer
Parents
Loading