!757 remove redundant data copy

Merge pull request !757 from dinghao/r0.2
This commit is contained in:
mindspore-ci-bot 2020-04-27 22:37:40 +08:00 committed by Gitee
commit c52934923e
1 changed files with 0 additions and 3 deletions

View File

@ -166,9 +166,6 @@ Tensor::Tensor(const py::int_ &input, const TypePtr &data_type) { init(py::array
Tensor::Tensor(const Tensor &tensor, const TypePtr &data_type)
: MetaTensor(tensor), dirty_(tensor.dirty_), device_address_(tensor.device_address_) {
init(tensor.data_, data_type);
if (device_address_ != nullptr) {
(void)data_sync();
}
}
Tensor &Tensor::operator=(const Tensor &tensor) {