diff --git a/paddle/fluid/framework/details/fetch_op_handle.cc b/paddle/fluid/framework/details/fetch_op_handle.cc index 6c8b8937ebe646042f71cb58cfbc2d32426a4e3c..fe14e3e91da34e5993a68d10a13b275bab576ce6 100644 --- a/paddle/fluid/framework/details/fetch_op_handle.cc +++ b/paddle/fluid/framework/details/fetch_op_handle.cc @@ -63,8 +63,7 @@ void FetchOpHandle::RunImpl() { auto &t = var->Get(); if (platform::is_gpu_place(t.place())) { #ifdef PADDLE_WITH_CUDA - TensorCopy(t, cpu, *dev_ctxes_.at(t.place()), &tensors_[i]); - dev_ctxes_.at(t.place())->Wait(); + TensorCopy(t, cpu, &tensors_[i]); #endif } else { tensors_[i].ShareDataWith(t);