Remove partially initialized Tensor in Deserialization (#14197)
authorJerry Zhang <jerryzh@fb.com>
Tue, 11 Dec 2018 01:13:51 +0000 (17:13 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 11 Dec 2018 01:17:29 +0000 (17:17 -0800)
commit9b272c08cfcb0453d1e883871cd5fa0d0ed534a1
tree156c0c421910f21ca9efa041d606f9cb2ac38c1c
parent4a145cd95c312828da66a638191eeb6675705977
Remove partially initialized Tensor in Deserialization (#14197)

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

Pull Request resolved: https://github.com/pytorch/pytorch/pull/13642

Previously we pass in a patially initialized Tensor to Deserialize and it will fill
it with the result of deserialization of a tensor proto. Now we want it to return
a Tensor directly since it's just a shared pointer to TensorImpl.

Reviewed By: dzhulgakov

Differential Revision: D12874357

fbshipit-source-id: 12b80a763375da23cfa64a74d6bc186d8d03b94f
binaries/benchmark_helper.cc
caffe2/core/blob_serialization.cc
caffe2/core/blob_serialization.h
caffe2/core/blob_test.cc
caffe2/operators/map_ops.h
caffe2/operators/tensor_protos_db_input.h