From 4185dd48e4bc506d7a579e8b1ed95d1b65336698 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Tue, 20 Mar 2018 15:59:05 +0800 Subject: [PATCH] Disable multi-thread --- paddle/fluid/framework/parallel_executor.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 248a1b4a25..25f8d7afde 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -84,8 +84,8 @@ struct OpHandle { virtual ~OpHandle() {} - virtual void Run() { PADDLE_THROW("Not implemented"); } - virtual void Wait(platform::DeviceContext *waited_dev) {} + virtual void Run() = 0; + virtual void Wait(platform::DeviceContext *waited_dev) = 0; }; struct ComputationOpHandle : public OpHandle { @@ -382,7 +382,6 @@ struct NCCLAllReduceOpHandle : public OpHandle { } auto &var_name = static_cast(this->inputs_[0])->name_; - VLOG(3) << "Invoke NCCL AllReduce"; int dtype = -1; size_t numel = 0; @@ -848,7 +847,8 @@ void ParallelExecutor::RunOp( LOG(FATAL) << "Unknown exception catched"; } }; - member_->pool_.enqueue(op_run); + op_run(); + // member_->pool_.enqueue(op_run); } } // namespace framework } // namespace paddle -- GitLab