提交 d839bd0d 编写于 作者: D dongdaxiang

simple commit

上级 c9b79989
...@@ -18,12 +18,12 @@ limitations under the License. */ ...@@ -18,12 +18,12 @@ limitations under the License. */
#include <map> #include <map>
#include <memory> #include <memory>
#include <mutex> // NOLINT #include <mutex> // NOLINT
#include <random> // local_random_engine
#include <set> #include <set>
#include <string> #include <string>
#include <thread> // NOLINT #include <thread> // NOLINT
#include <typeinfo> #include <typeinfo>
#include <vector> #include <vector>
#include <random> // local_random_engine
#include "paddle/fluid/framework/data_feed.pb.h" #include "paddle/fluid/framework/data_feed.pb.h"
#include "paddle/fluid/framework/executor.h" #include "paddle/fluid/framework/executor.h"
#include "paddle/fluid/framework/executor_thread_worker.h" #include "paddle/fluid/framework/executor_thread_worker.h"
...@@ -45,8 +45,7 @@ inline std::default_random_engine& local_random_engine() { ...@@ -45,8 +45,7 @@ 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>( static_cast<uint64_t>(current_realtime() * 1000)};
current_realtime() * 1000)};
engine.seed(sseq); engine.seed(sseq);
} }
}; };
...@@ -63,14 +62,12 @@ class AsyncExecutor { ...@@ -63,14 +62,12 @@ class AsyncExecutor {
const std::vector<std::string>& filelist, const std::vector<std::string>& filelist,
const int thread_num, const int thread_num,
const std::vector<std::string>& fetch_names, const std::vector<std::string>& fetch_names,
const std::string& mode, const std::string& mode, const bool debug = false);
const bool debug = false);
#ifdef PADDLE_WITH_PSLIB #ifdef PADDLE_WITH_PSLIB
void InitServer(const std::string& dist_desc, int index); void InitServer(const std::string& dist_desc, int index);
void InitWorker( void InitWorker(const std::string& dist_desc,
const std::string& dist_desc, const std::vector<uint64_t>& host_sign_list, int node_num,
const std::vector<uint64_t>& host_sign_list, int index);
int node_num, int index);
uint64_t StartServer(); uint64_t StartServer();
void StopServer(); void StopServer();
void GatherServers(const std::vector<uint64_t>& host_sign_list, int node_num); void GatherServers(const std::vector<uint64_t>& host_sign_list, int node_num);
...@@ -101,10 +98,7 @@ class AsyncExecutor { ...@@ -101,10 +98,7 @@ class AsyncExecutor {
private: private:
int actual_thread_num; int actual_thread_num;
}; };
} // namespace framework } // namespace framework
} // namespace paddle } // namespace paddle
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册