Skip to content

Commit 7050039

Browse files
committed
wip
1 parent e2ca8e1 commit 7050039

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

paddle/fluid/operators/detail/grpc_client.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ bool RPCClient::AsyncSendVariable(const std::string& ep,
3535
const framework::Scope* p_scope = &scope;
3636
const auto ch = GetChannel(ep_val);
3737

38-
framework::Async([var_name_val, p_ctx, ep_val, p_scope, time_out, ch, this] {
38+
framework::AsyncIO([var_name_val, p_ctx, ep_val, p_scope, time_out, ch,
39+
this] {
3940
auto* var = p_scope->FindVar(var_name_val);
4041

4142
::grpc::ByteBuffer req;
@@ -90,7 +91,8 @@ bool RPCClient::AsyncGetVariable(const std::string& ep,
9091
const framework::Scope* p_scope = &scope;
9192
const auto ch = GetChannel(ep_val);
9293

93-
framework::Async([var_name_val, ep_val, p_scope, p_ctx, time_out, ch, this] {
94+
framework::AsyncIO([var_name_val, ep_val, p_scope, p_ctx, time_out, ch,
95+
this] {
9496
// prepare input
9597
sendrecv::VariableMessage req;
9698
req.set_varname(var_name_val);
@@ -133,8 +135,8 @@ bool RPCClient::AsyncPrefetchVariable(const std::string& ep,
133135
const framework::Scope* p_scope = &scope;
134136
const auto ch = GetChannel(ep_val);
135137

136-
framework::Async([in_var_name_val, out_var_name_val, ep_val, p_scope, p_ctx,
137-
time_out, ch, this] {
138+
framework::AsyncIO([in_var_name_val, out_var_name_val, ep_val, p_scope, p_ctx,
139+
time_out, ch, this] {
138140
auto* var = p_scope->FindVar(in_var_name_val);
139141

140142
::grpc::ByteBuffer req;
@@ -197,7 +199,7 @@ bool RPCClient::Wait() {
197199
std::vector<std::future<void>> waits(req_count_);
198200

199201
for (int i = 0; i < req_count_; i++) {
200-
waits[i] = framework::Async([i, &a, this] { a[i] = Proceed(); });
202+
waits[i] = framework::AsyncIO([i, &a, this] { a[i] = Proceed(); });
201203
}
202204

203205
for (int i = 0; i < req_count_; i++) {

0 commit comments

Comments
 (0)