fix tag in async_executor

revert-15207-remove_op_handle_lock_and_fix_var
dongdaxiang 7 years ago
parent 95b887c4f2
commit c9b799896e

@ -45,7 +45,8 @@ inline std::default_random_engine& local_random_engine() {
engine_wrapper_t() { engine_wrapper_t() {
static std::atomic<uint64_t> x(0); static std::atomic<uint64_t> x(0);
std::seed_seq sseq = {x++, x++, x++, std::seed_seq sseq = {x++, x++, x++,
static_cast<uint64_t>(current_realtime() * 1000)}; static_cast<uint64_t>(
current_realtime() * 1000)};
engine.seed(sseq); engine.seed(sseq);
} }
}; };
@ -77,6 +78,7 @@ class AsyncExecutor {
void SaveModel(const std::string& path); void SaveModel(const std::string& path);
void InitParamConfig(); void InitParamConfig();
#endif #endif
private: private:
void CreateThreads(ExecutorThreadWorker* worker, void CreateThreads(ExecutorThreadWorker* worker,
const ProgramDesc& main_program, const ProgramDesc& main_program,
@ -87,6 +89,7 @@ class AsyncExecutor {
#ifdef PADDLE_WITH_PSLIB #ifdef PADDLE_WITH_PSLIB
void PrepareDenseThread(const std::string& mode); void PrepareDenseThread(const std::string& mode);
#endif #endif
public: public:
#ifdef PADDLE_WITH_PSLIB #ifdef PADDLE_WITH_PSLIB
std::shared_ptr<paddle::distributed::PSlib> _pslib_ptr; std::shared_ptr<paddle::distributed::PSlib> _pslib_ptr;

@ -440,7 +440,6 @@ void AsyncExecutorThreadWorker::PushDense(int table_id) {
auto status = _pslib_ptr->_worker_ptr->push_dense( auto status = _pslib_ptr->_worker_ptr->push_dense(
regions.data(), regions.size(), table_id); regions.data(), regions.size(), table_id);
_push_dense_status.push_back(std::move(status)); _push_dense_status.push_back(std::move(status));
} }
void AsyncExecutorThreadWorker::PullSparse(int table_id) { void AsyncExecutorThreadWorker::PullSparse(int table_id) {

@ -160,7 +160,7 @@ class ExecutorThreadWorker {
void SetFetchVarNames(const std::vector<std::string>& fetch_var_names); void SetFetchVarNames(const std::vector<std::string>& fetch_var_names);
#ifdef PADDLE_WITH_PSLIB #ifdef PADDLE_WITH_PSLIB
virtual void SetPSlibPtr( virtual void SetPSlibPtr(
std::shared_ptr<paddle::distributed::PSlib> pslib_ptr) {}; std::shared_ptr<paddle::distributed::PSlib> pslib_ptr) {}
virtual void SetPullDenseThread( virtual void SetPullDenseThread(
std::shared_ptr<DensePullThread> dpt) {} std::shared_ptr<DensePullThread> dpt) {}
virtual void SetParamConfig( virtual void SetParamConfig(

Loading…
Cancel
Save