From 54013a93b15cde1863f7fc2a5ea89f6b8655aae9 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Mon, 18 Jun 2018 12:52:55 +0800 Subject: [PATCH] add RequestCheckpointNotify in grpc --- paddle/fluid/operators/detail/grpc_server.cc | 5 +++++ paddle/fluid/operators/detail/request_handler.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/detail/grpc_server.cc b/paddle/fluid/operators/detail/grpc_server.cc index 238457b3e1..61afffeeba 100644 --- a/paddle/fluid/operators/detail/grpc_server.cc +++ b/paddle/fluid/operators/detail/grpc_server.cc @@ -247,6 +247,9 @@ void AsyncGRPCServer::StartServer() { std::bind(&AsyncGRPCServer::TryToRegisterNewOne, this, std::placeholders::_1, std::placeholders::_2); + LOG(INFO) << "Server StartServer on " + << "TryToRegisterNewOne bind finished"; + for (auto& t : rpc_call_map_) { auto& rpc_name = t.first; auto& cq = rpc_cq_[rpc_name]; @@ -255,6 +258,8 @@ void AsyncGRPCServer::StartServer() { reqs.reserve(kRequestBufSize); + LOG(INFO) << "TryToRegisterNewOne on RPC NAME: " << rpc_name << "I: " << i; + for (int i = 0; i < kRequestBufSize; i++) { TryToRegisterNewOne(rpc_name, i); } diff --git a/paddle/fluid/operators/detail/request_handler.h b/paddle/fluid/operators/detail/request_handler.h index fd33521fd1..387a6b1190 100644 --- a/paddle/fluid/operators/detail/request_handler.h +++ b/paddle/fluid/operators/detail/request_handler.h @@ -43,8 +43,8 @@ constexpr char kRequestCheckpoint[] = "RequestCheckpoint"; #define FETCH_BARRIER_MESSAGE "FETCH_BARRIER@RECV" #define COMPLETE_MESSAGE "COMPLETE@RECV" -#define CHECKPOINT_SAVE_MESSAGE "SAVE" -#define CHECKPOINT_LOAD_MESSAGE "LOAD" +#define CHECKPOINT_SAVE_MESSAGE "SAVE@CHECKPOINTNOTIFY" +#define CHECKPOINT_LOAD_MESSAGE "LOAD@CHECKPOINTNOTIFY" class RPCServer; -- GitLab