Move TensorImpl::CopyFrom to caffe2::Tensor (1/2) (#14656)
authorSebastian Messmer <messmer@fb.com>
Fri, 14 Dec 2018 02:38:54 +0000 (18:38 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Dec 2018 02:41:23 +0000 (18:41 -0800)
commit070f33f15476bb8b4e62101c374fb65b8b21c000
treed3f0de4daf520c4cd3a87264a633dda5ba4e61af
parentdc72a5e02c1ecb105ea58cafcf10ef3a6f7d9c25
Move TensorImpl::CopyFrom to caffe2::Tensor (1/2) (#14656)

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

This diff doesn't move it yet, but prepares it to be moved, i.e. removes all access to class internals.

dzhulgakov: Please comment on if you think it still makes sense to land this even though it's not blocking anymore since we're going to move at::CopyBytes anyhow.

ezyang: There's some changes in the implementation, especially handling undefined dest tensors. Please review carefully.

Reviewed By: ezyang

Differential Revision: D13287688

fbshipit-source-id: 17800ca8a79ab1633f23be58d96f99a160d8ed24
c10/core/TensorImpl.h
caffe2/core/tensor.h