提交 f997c9b7 编写于 作者: Q qiaolongfei

Merge branch 'refine-listen-and-serve-op' of...

Merge branch 'refine-listen-and-serve-op' of ssh://github.com/jacquesqiao/Paddle into add-async-listen-and-serv-op
......@@ -100,9 +100,10 @@ void ListenAndServOp::Stop() {
server_thread_->join();
}
void ListenAndServOp::RunSyncUpdate(
framework::Executor *executor, framework::ProgramDesc *program,
framework::Scope *recv_scope, framework::BlockDesc *prefetch_block) const {
void ListenAndServOp::RunSyncLoop(framework::Executor *executor,
framework::ProgramDesc *program,
framework::Scope *recv_scope,
framework::BlockDesc *prefetch_block) const {
auto fan_in = Attr<int>("Fanin");
size_t num_blocks = program->Size();
......@@ -302,7 +303,7 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope,
// Write to a file of server selected port for python use.
SavePort(rpc_service_);
if (sync_mode) {
RunSyncUpdate(&executor, program, &recv_scope, prefetch_block);
RunSyncLoop(&executor, program, &recv_scope, prefetch_block);
} else {
RunAsyncUpdate(&executor, program, &recv_scope, prefetch_block);
}
......
......@@ -41,7 +41,7 @@ class ListenAndServOp : public framework::OperatorBase {
int GetSelectedPort() const;
void RunSyncUpdate(framework::Executor* executor,
void RunSyncLoop(framework::Executor* executor,
framework::ProgramDesc* program,
framework::Scope* recv_scope,
framework::BlockDesc* prefetch_block) const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册