@@ -85,7 +85,7 @@ void HeterClient::CreateClient2XpuConnection() {
85
85
xpu_channels_[i].reset (new brpc::Channel ());
86
86
if (xpu_channels_[i]->Init (xpu_list_[i].c_str (), " " , &options) != 0 ) {
87
87
VLOG (0 ) << " HeterClient channel init fail. Try Again" ;
88
- auto ip_port = :: paddle::string::Split (xpu_list_[i], ' :' );
88
+ auto ip_port = paddle::string::Split (xpu_list_[i], ' :' );
89
89
std::string ip = ip_port[0 ];
90
90
int port = std::stoi (ip_port[1 ]);
91
91
std::string int_ip_port = GetIntTypeEndpoint (ip, port);
@@ -100,7 +100,7 @@ void HeterClient::CreateClient2XpuConnection() {
100
100
if (previous_xpu_channels_[i]->Init (
101
101
previous_xpu_list_[i].c_str (), " " , &options) != 0 ) {
102
102
VLOG (0 ) << " HeterClient channel init fail. Try Again" ;
103
- auto ip_port = :: paddle::string::Split (previous_xpu_list_[i], ' :' );
103
+ auto ip_port = paddle::string::Split (previous_xpu_list_[i], ' :' );
104
104
std::string ip = ip_port[0 ];
105
105
int port = std::stoi (ip_port[1 ]);
106
106
std::string int_ip_port = GetIntTypeEndpoint (ip, port);
@@ -167,25 +167,25 @@ void HeterClient::SendAndRecvAsync(
167
167
// int idx = 1; // for test
168
168
// LOG(INFO) << "xpu_channels_ size: " << xpu_channels_.size();
169
169
// channel = xpu_channels_[idx].get(); // 为了适配 send_and_recv op
170
- // :: paddle::distributed::PsService_Stub stub(channel);
170
+ // paddle::distributed::PsService_Stub stub(channel);
171
171
// stub.SendToSwitch(&closure->cntl, &request, &closure->response,
172
172
// closure); fut.wait();
173
173
VLOG (4 ) << " calling switch service done" ;
174
174
return ;
175
175
}
176
- :: paddle::distributed::PsService_Stub stub (channel);
176
+ paddle::distributed::PsService_Stub stub (channel);
177
177
stub.SendAndRecvVariable (
178
178
&closure->cntl , &request, &closure->response , closure);
179
179
}
180
180
181
181
std::future<int32_t > HeterClient::SendCmd (
182
182
uint32_t table_id, int cmd_id, const std::vector<std::string>& params) {
183
183
size_t request_call_num = xpu_channels_.size ();
184
- :: paddle::distributed::DownpourBrpcClosure* closure =
185
- new :: paddle::distributed::DownpourBrpcClosure (
184
+ paddle::distributed::DownpourBrpcClosure* closure =
185
+ new paddle::distributed::DownpourBrpcClosure (
186
186
request_call_num, [request_call_num, cmd_id](void * done) {
187
187
int ret = 0 ;
188
- auto * closure = (:: paddle::distributed::DownpourBrpcClosure*)done;
188
+ auto * closure = (paddle::distributed::DownpourBrpcClosure*)done;
189
189
for (size_t i = 0 ; i < request_call_num; ++i) {
190
190
if (closure->check_response (i, cmd_id) != 0 ) {
191
191
ret = -1 ;
@@ -204,7 +204,7 @@ std::future<int32_t> HeterClient::SendCmd(
204
204
for (const auto & param : params) {
205
205
closure->request (i)->add_params (param);
206
206
}
207
- :: paddle::distributed::PsService_Stub rpc_stub (xpu_channels_[i].get ());
207
+ paddle::distributed::PsService_Stub rpc_stub (xpu_channels_[i].get ());
208
208
closure->cntl (i)->set_timeout_ms (
209
209
FLAGS_pserver_timeout_ms); // cmd msg don't limit timeout for save/load
210
210
rpc_stub.service (
@@ -270,7 +270,7 @@ int HeterClient::Send(const platform::DeviceContext& ctx,
270
270
}
271
271
brpc::Channel* channel = send_switch_channels_[0 ].get ();
272
272
// brpc::Channel* channel = xpu_channels_[0].get();
273
- :: paddle::distributed::PsService_Stub stub (channel);
273
+ paddle::distributed::PsService_Stub stub (channel);
274
274
stub.SendToSwitch (&closure->cntl , &request, &closure->ps_response , closure);
275
275
276
276
VLOG (4 ) << " waiting SendToSwitch response result......" ;
@@ -317,7 +317,7 @@ int HeterClient::Send(int group_id,
317
317
send_switch_channels_.push_back (xpu_channels_[0 ]);
318
318
}
319
319
brpc::Channel* channel = send_switch_channels_[0 ].get ();
320
- :: paddle::distributed::PsService_Stub stub (channel);
320
+ paddle::distributed::PsService_Stub stub (channel);
321
321
stub.SendToSwitch (&closure->cntl , &request, &closure->ps_response , closure);
322
322
fut.wait ();
323
323
delete closure;
@@ -362,7 +362,7 @@ int HeterClient::Recv(const platform::DeviceContext& ctx,
362
362
recv_switch_channels_.push_back (xpu_channels_[1 ]);
363
363
}
364
364
brpc::Channel* channel = recv_switch_channels_[0 ].get ();
365
- :: paddle::distributed::PsService_Stub stub (channel);
365
+ paddle::distributed::PsService_Stub stub (channel);
366
366
stub.RecvFromSwitch (&closure->cntl , &request, &closure->response , closure);
367
367
fut.wait ();
368
368
VLOG (4 ) << " RecvFromSwitch done" ;
@@ -412,7 +412,7 @@ int HeterClient::Recv(int group_id,
412
412
recv_switch_channels_.push_back (xpu_channels_[0 ]);
413
413
}
414
414
brpc::Channel* channel = recv_switch_channels_[0 ].get ();
415
- :: paddle::distributed::PsService_Stub stub (channel);
415
+ paddle::distributed::PsService_Stub stub (channel);
416
416
stub.RecvFromSwitch (&closure->cntl , &request, &closure->response , closure);
417
417
fut.wait ();
418
418
VLOG (4 ) << " RecvFromSwitch done" ;
0 commit comments