Skip to content

Commit cbaa24f

Browse files
authored
Merge pull request #11450 from jacquesqiao/fix-prefetch-bug
outvar must be create in local scope for prefetch
2 parents d07d953 + 490a07f commit cbaa24f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/fluid/operators/detail/grpc_server.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ class RequestPrefetch final : public RequestBase {
169169

170170
auto scope = request_->GetMutableLocalScope();
171171
auto invar = scope->FindVar(in_var_name);
172-
framework::Variable* outvar = scope->FindVar(out_var_name);
172+
// out var must be created in local scope!
173+
framework::Variable* outvar = scope->Var(out_var_name);
173174

174175
request_handler_->Handle(in_var_name, scope, invar, &outvar, out_var_name);
175176

0 commit comments

Comments
 (0)