diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index b86909766298026fa0a877521edc510936deac84..daa19eb17c88240ad27ee422ae70469868089ca1 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -138,15 +138,9 @@ struct ComputationOpHandle : public OpHandle { protected: void RunImpl() override { - // Wait other op if necessary - if (platform::is_gpu_place(place_)) { - int dev_id = boost::get(place_).device; - cudaSetDevice(dev_id); - } auto *cur_ctx = dev_ctx_[place_]; for (auto *in : inputs_) { if (in->generated_op_ && in->generated_op_->dev_ctx_[place_] != cur_ctx) { - VLOG(3) << "Wait " << in->generated_op_->DebugString(); in->generated_op_->Wait(cur_ctx); } }