Moving at::Tensor into caffe2::Tensor without bumping refcount (#19388)
authorSebastian Messmer <messmer@fb.com>
Thu, 18 Apr 2019 21:07:30 +0000 (14:07 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 18 Apr 2019 21:13:26 +0000 (14:13 -0700)
commit17f05ad5e562830127dd06be6c11c10453a86d0e
tree300da7039b43054838e9dd94553cf4ed1913c7bf
parent88f70a16708369ad5d179fbe515f43739c0f2591
Moving at::Tensor into caffe2::Tensor without bumping refcount (#19388)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19388

The old implementation forced a refcount bump when converting at::Tensor to caffe2::Tensor.
Now, it is possible to move it without a refcount bump.

Reviewed By: dzhulgakov

Differential Revision: D14986815

fbshipit-source-id: 92b4b0a6f323ed38376ffad75f960cad250ecd9b
aten/src/ATen/core/Tensor.h
aten/src/ATen/templates/Tensor.h
caffe2/core/tensor.h