Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add XBlobGetMutableTensor that returns Tensor (pytorch#14424)
Summary: Pull Request resolved: pytorch#14424 Pull Request resolved: pytorch#14136 Since now Tensor is a shared_ptr, it doesn't make sense to have Tensor* around anymore, so we want to change Tensor* to Tensor in the interface. We added functions that work with `Tensor` instead of `Tensor*` in this diff. To remove Tensor*, we'll do following ``` auto* Y = Ouptut(0); Y->mutable_data... ``` --> ``` auto Y = Output(0); Y.mutable_data... ``` But to run clangr codemod, we'll keep both APIs in different names, e.g. `Output` and `XOutput`, and do the refactor and then delete the old method and rename the new method into the old one. For example for `Output`, we'll first codemod the callsites from `Output` to `XOutput`, then delete the old `Output` and rename `XOutput` to `Output` in the end. Reviewed By: smessmer Differential Revision: D12934074 fbshipit-source-id: 120778830835fc4d90286cf2ed00b4994cf32737
- Loading branch information