From 6879560ad8efdd01e5aad6be77ad163b1bb30183 Mon Sep 17 00:00:00 2001 From: dongdaxiang Date: Thu, 15 Nov 2018 11:53:51 +0800 Subject: [PATCH] refine async_executor_refactor.cc --- paddle/fluid/framework/async_executor_refactor.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddle/fluid/framework/async_executor_refactor.cc b/paddle/fluid/framework/async_executor_refactor.cc index 0a28d183893..96330b431e2 100644 --- a/paddle/fluid/framework/async_executor_refactor.cc +++ b/paddle/fluid/framework/async_executor_refactor.cc @@ -101,13 +101,13 @@ void AsyncExecutor::RunFromFiles( 2) each reader has a Next() iterface, that can fetch an instance from the input queue */ - // todo: should be factory method for creating datafeed std::vector > readers; readers.resize(thread_num); for (int i = 0; i < readers.size(); ++i) { readers[i] = DataFeedFactory::CreateDataFeed(data_feed_desc.name()); } + // todo(dongdaxiang): add the following code for worker generalization /* std::vector > workers; workers.resize(thread_num); @@ -129,7 +129,6 @@ void AsyncExecutor::RunFromFiles( CreateThreads(workers[thidx].get(), main_program, readers[thidx].get(), root_scope_, thidx); } - // start executing ops in multiple threads for (int thidx = 0; thidx < thread_num_; ++thidx) { threads.push_back(std::thread(&ExecutorThreadWorker::TrainFiles, -- GitLab