提交 c5293492 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!757 remove redundant data copy

Merge pull request !757 from dinghao/r0.2
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册