summaryrefslogtreecommitdiff
path: root/aten
diff options
context:
space:
mode:
authorJerry Zhang <jerryzh@fb.com>2019-01-25 15:32:45 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-01-25 15:39:11 -0800
commit539894d70ab53e3f5248d38a2a849d79801c64e9 (patch)
treef4247f8baac9fa3d000d0dcba9013aa918379e0c /aten
parentca86d1f01de0d5a925dd01ddf24154fd2233c0ba (diff)
downloadpytorch-539894d70ab53e3f5248d38a2a849d79801c64e9.tar.gz
pytorch-539894d70ab53e3f5248d38a2a849d79801c64e9.tar.bz2
pytorch-539894d70ab53e3f5248d38a2a849d79801c64e9.zip
Remove caffe2::ShareData (#16139)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/16139 Original commit changeset: 4b15a4c62995 Reviewed By: dzhulgakov Differential Revision: D13677464 fbshipit-source-id: 1a644a88fac02b44feebac48ccc01bc72cc47edb
Diffstat (limited to 'aten')
-rw-r--r--aten/src/ATen/test/tensor_interop_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/aten/src/ATen/test/tensor_interop_test.cpp b/aten/src/ATen/test/tensor_interop_test.cpp
index ec3886b306..f926312b5f 100644
--- a/aten/src/ATen/test/tensor_interop_test.cpp
+++ b/aten/src/ATen/test/tensor_interop_test.cpp
@@ -66,11 +66,11 @@ TEST(TestTensorInterop, PytorchToCaffe2Op) {
auto* c2_tensor_a = BlobSetTensor(workspace.CreateBlob("a"), at_tensor_a.getIntrusivePtr());
auto* c2_tensor_b = BlobSetTensor(workspace.CreateBlob("b"), at_tensor_b.getIntrusivePtr());
- // Test ShareData as well
+ // Test Alias
{
- auto c2_tensor_c = XBlobGetMutableTensor(workspace.CreateBlob("c"), {0}, at::kCPU);
- c2_tensor_c.ResizeLike(at_tensor_c.getIntrusivePtr());
- c2_tensor_c.ShareData(at_tensor_c.getIntrusivePtr());
+ caffe2::Tensor c2_tensor_from_aten(at_tensor_c.getIntrusivePtr());
+ BlobSetTensor(workspace.CreateBlob("c"), c2_tensor_from_aten.Alias());
+
}
{