提交 4bfadcd1 编写于 作者: C chengduoZH

fix data trans

上级 397a69d9
......@@ -38,7 +38,8 @@ void TransDataDevice(const Tensor& in, const platform::Place& dst_place,
auto* dev_ctx = GetDeviceContext(in.place(), dst_place);
TensorCopy(in, dst_place, *dev_ctx, out);
if (platform::is_gpu_place(in.place()) && platform::is_cpu_place(dst_place)) {
if (in.place().which() != dst_place.which()) {
dev_ctx->Wait();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册