pytorch
ab0d9b18 - [LT] Support Tensor.is_alias_of

Commit
2 years ago
[LT] Support Tensor.is_alias_of Summary: Tensor.is_alias_of relies on Storage to perform. However, LTCTensorImpl was not implemented with that in mind. This commit adds a fake storage to LazyTensor as a marker to mark LazyTensors that point to the same storage. The reason why it's not done at LTCTensorImpl is that LazyTensor maintains the view ops/alias logic in LazyTensor class instead of relying on TensorImpl to do the check. Test Plan: ./build/bin/test_lazy --gtest_filter=LazyOpsTest.IsAliasOf Pull Request resolved: https://github.com/pytorch/pytorch/pull/75246 Approved by: https://github.com/bdhirsh
Author
Jiewen Tan
Committer
Parents
Loading