diff --git a/paddle/fluid/framework/async_executor.cc b/paddle/fluid/framework/async_executor.cc index 943a3e9750d33b7999113ecc1474177a09c54d67..53c976b17f8cd6502e928ca4d60e9f5a104c2206 100644 --- a/paddle/fluid/framework/async_executor.cc +++ b/paddle/fluid/framework/async_executor.cc @@ -168,13 +168,9 @@ void ExecutorThreadWorker::CreateThreadScope(const ProgramDesc& program) { if (var->Persistable()) { auto* ptr = root_scope_->Var(var->Name()); CreateTensor(ptr, var->GetType()); - // LOGERR("create Persistable var[%s] finished", - // var->Name().c_str()); } else { auto* ptr = thread_scope_->Var(var->Name()); CreateTensor(ptr, var->GetType()); - // LOGERR("create unpersistable var[%s] finished", - // var->Name().c_str()); } } } @@ -530,7 +526,7 @@ void AsyncExecutor::PrepareThreads(const ProgramDesc& host_program) { workers_[i]->CreateThreadScope(host_program); workers_[i]->SetInspectVarName(inspect_var_name_); workers_[i]->SetModelParamNames(model_param_names_); - workers_[i]->SetSparseCommData(sparse_comm_data_); + workers_[i]->SetSparseCommData(sparse_comm_data_); workers_[i]->SetMainProgram(host_program); workers_[i]->SetModelPrefix(model_prefix_); } @@ -540,9 +536,7 @@ void AsyncExecutor::PrepareThreads(const ProgramDesc& host_program) { // filelist is static so that we only add filelist once workers_[0]->AddTrainFile(filelist_[i]); } - // mpi_wrapper::ModelParam model_param(true); - // workers_[0]->register_parallel_training_param(model_param); - + for (unsigned i = 0; i < thread_num_; ++i) { // new a datafeed here std::shared_ptr local_feed = CreateDataFeed(feed_name_.c_str()); diff --git a/paddle/fluid/pybind/async_executor_py.cc b/paddle/fluid/pybind/async_executor_py.cc index 1dc13fe2ef4c4baf53f2736a7e3235bcdaef422f..612a1c0924c24db1664234a08e767b2e2d16f978 100644 --- a/paddle/fluid/pybind/async_executor_py.cc +++ b/paddle/fluid/pybind/async_executor_py.cc @@ -60,11 +60,7 @@ void BindAsyncExecutor(py::module* m) { for (int i = 0; i < base_param.model_param_names_size(); ++i) { param_names.push_back(base_param.model_param_names(i)); } -#ifdef FORK_V1 - paddle::framework::InitDevices(); -#else paddle::framework::InitDevices(false); -#endif self.InitRootScope(scope); self.SetThreadNum(base_param.thread_num()); self.SetMaxTrainingEpoch(base_param.max_epoch());