From 516317cf91037698d53732769d3dd3431760ab3a Mon Sep 17 00:00:00 2001 From: chengduo Date: Thu, 9 May 2019 06:06:54 +0800 Subject: [PATCH] use sync copy (#17291) test=develop --- paddle/fluid/framework/details/fetch_op_handle.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddle/fluid/framework/details/fetch_op_handle.cc b/paddle/fluid/framework/details/fetch_op_handle.cc index 6c8b8937ebe..fe14e3e91da 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); -- GitLab