Skip to content
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

Executor should wait for operators before deleting the local scope #9464

Closed
tonyyang-svail opened this issue Mar 28, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@tonyyang-svail
Copy link

tonyyang-svail commented Mar 28, 2018

In every Executor:Run(), all the temporary variables are created in a local scope. This local scope (including variables belong to it) is deleted at the end of the Executor:Run().

Since operators maybe launched asynchronously, the host code has to explicitly add a wait. Otherwise, delete local scope may happen before the execution of an operator.

Sidenote: fetch_op, usually the last op to be executed, has a wait. So ProgramDesc with fetch op won't have this issue. But it is not guaranteed that every ProgramDesc has a fetch op at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant