-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add keep_kids flag for executor #11524
add keep_kids flag for executor #11524
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kids should not be kept.
- If users add a
FetchOp
, the device context will be synchronized. Every operator should be completed after Run. - If users do not add a
FetchOp
, we should wait for the device context instead of keeping children scope. (We may add code to sync device for this situation.)
@reyoung In while_op.cc, the the step scopes created in the scope passed to executor.run needs to be kept so that they can be accessed by while_grad_op. If kids are dropped, how to achieve this? |
In control operators, the |
In the original design of Executor, if Paddle/paddle/framework/executor.cc Lines 130 to 132 in 6332b82
However, it seems the Paddle/paddle/fluid/framework/executor.cc Lines 347 to 352 in 3f8d9b0
|
This needs to be fixed. Otherwise nested while_op does not work. What should be the right way to fix it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge this HotFix first. I will write a issue to record this problem
The problem is recorded in this issue #11597 |
No description provided.