提交 76b0a384 编写于 作者: D dzhwinter 提交者: dongzhihong

"fix style" (#13094)

上级 cfe611f1
...@@ -62,7 +62,10 @@ class ShrinkRNNMemoryOp : public ArrayOp { ...@@ -62,7 +62,10 @@ class ShrinkRNNMemoryOp : public ArrayOp {
} }
if (dst_num_rows != 0) { if (dst_num_rows != 0) {
out_tensor.ShareDataWith(x_tensor.Slice(0, height)); out_tensor.mutable_data(place, x_tensor.type());
auto dev_ctx = platform::DeviceContextPool::Instance().Get(place);
framework::TensorCopy(x_tensor.Slice(0, height), place, *dev_ctx,
&out_tensor);
} }
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册