diff --git a/paddle/fluid/framework/details/fetch_op_handle.cc b/paddle/fluid/framework/details/fetch_op_handle.cc index 946ee91a667496e2427304df4228334bb1061890..423449abff97dbf70d81314f852d9135e25f243f 100644 --- a/paddle/fluid/framework/details/fetch_op_handle.cc +++ b/paddle/fluid/framework/details/fetch_op_handle.cc @@ -66,7 +66,7 @@ void FetchOpHandle::RunImpl() { auto &t = var->Get(); if (platform::is_gpu_place(t.place())) { #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(); #endif } else {