fix fetch_op_handle

release/0.12.0
fengjiayi 7 years ago
parent dd5946528a
commit 00b54d5803

@ -66,7 +66,7 @@ void FetchOpHandle::RunImpl() {
auto &t = var->Get<framework::LoDTensor>(); auto &t = var->Get<framework::LoDTensor>();
if (platform::is_gpu_place(t.place())) { if (platform::is_gpu_place(t.place())) {
#ifdef PADDLE_WITH_CUDA #ifdef PADDLE_WITH_CUDA
TensorCopy(t, cpu, *dev_ctxes_[t.place()], &tensors_[i]); TensorCopy(t, cpu, *dev_ctxes_[t.place()], &tensors_[i], true);
dev_ctxes_.at(t.place())->Wait(); dev_ctxes_.at(t.place())->Wait();
#endif #endif
} else { } else {

Loading…
Cancel
Save