提交 5a9f17f0 编写于 作者: X Xin Pan

clean up

上级 99274139
...@@ -296,7 +296,7 @@ void ListenAndServOp::RunAsyncLoop(framework::Executor *executor, ...@@ -296,7 +296,7 @@ void ListenAndServOp::RunAsyncLoop(framework::Executor *executor,
void ListenAndServOp::RunImpl(const framework::Scope &scope, void ListenAndServOp::RunImpl(const framework::Scope &scope,
const platform::Place &dev_place) const { const platform::Place &dev_place) const {
// Mark this as PS that it should decide profiling by listening from trainer. // Mark this as PS that it should decide profiling by listening from trainer.
platform::SetProfileLisener(); platform::SetProfileListener();
platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance(); platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance();
auto &dev_ctx = *pool.Get(dev_place); auto &dev_ctx = *pool.Get(dev_place);
framework::Scope &recv_scope = scope.NewScope(); framework::Scope &recv_scope = scope.NewScope();
......
...@@ -459,7 +459,7 @@ void DisableProfiler(EventSortingKey sorted_key, ...@@ -459,7 +459,7 @@ void DisableProfiler(EventSortingKey sorted_key,
bool IsProfileEnabled() { return g_state != ProfilerState::kDisabled; } bool IsProfileEnabled() { return g_state != ProfilerState::kDisabled; }
bool ShouldSendProfileState() { return should_send_profile_state; } bool ShouldSendProfileState() { return should_send_profile_state; }
void SetProfileLisener() { void SetProfileListener() {
std::mt19937 rng; std::mt19937 rng;
rng.seed(std::random_device()()); rng.seed(std::random_device()());
std::uniform_int_distribution<std::mt19937::result_type> dist6( std::uniform_int_distribution<std::mt19937::result_type> dist6(
......
...@@ -119,7 +119,7 @@ bool IsProfileEnabled(); ...@@ -119,7 +119,7 @@ bool IsProfileEnabled();
// Whether the trainer should send profiling state to PS. // Whether the trainer should send profiling state to PS.
bool ShouldSendProfileState(); bool ShouldSendProfileState();
// Mark current process as PS by assigning a lister id. // Mark current process as PS by assigning a lister id.
void SetProfileLisener(); void SetProfileListener();
int64_t ListenerId(); int64_t ListenerId();
} // namespace platform } // namespace platform
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册