提交 0f5a9cc9 编写于 作者: Q qiaolongfei

change RunSyncUpdate to RunSyncLoop

上级 d144dba4
...@@ -70,9 +70,10 @@ void ListenAndServOp::Stop() { ...@@ -70,9 +70,10 @@ void ListenAndServOp::Stop() {
server_thread_->join(); server_thread_->join();
} }
void ListenAndServOp::RunSyncUpdate( void ListenAndServOp::RunSyncLoop(framework::Executor *executor,
framework::Executor *executor, framework::ProgramDesc *program, framework::ProgramDesc *program,
framework::Scope *recv_scope, framework::BlockDesc *prefetch_block) const { framework::Scope *recv_scope,
framework::BlockDesc *prefetch_block) const {
auto fan_in = Attr<int>("Fanin"); auto fan_in = Attr<int>("Fanin");
size_t num_blocks = program->Size(); size_t num_blocks = program->Size();
...@@ -201,7 +202,7 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope, ...@@ -201,7 +202,7 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope,
sleep(5); sleep(5);
// Write to a file of server selected port for python use. // Write to a file of server selected port for python use.
SavePort(rpc_service_); SavePort(rpc_service_);
RunSyncUpdate(&executor, program, &recv_scope, prefetch_block); RunSyncLoop(&executor, program, &recv_scope, prefetch_block);
} }
class ListenAndServOpMaker : public framework::OpProtoAndCheckerMaker { class ListenAndServOpMaker : public framework::OpProtoAndCheckerMaker {
......
...@@ -41,7 +41,7 @@ class ListenAndServOp : public framework::OperatorBase { ...@@ -41,7 +41,7 @@ class ListenAndServOp : public framework::OperatorBase {
int GetSelectedPort() const; int GetSelectedPort() const;
void RunSyncUpdate(framework::Executor* executor, void RunSyncLoop(framework::Executor* executor,
framework::ProgramDesc* program, framework::ProgramDesc* program,
framework::Scope* recv_scope, framework::Scope* recv_scope,
framework::BlockDesc* prefetch_block) const; framework::BlockDesc* prefetch_block) const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册