-
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
Eagerly drop local scope in iteration #9838
Eagerly drop local scope in iteration #9838
Conversation
auto &t = scope->FindVar(kLocalExecScopeName) | ||
->Get<Scope *>() | ||
->FindVar(var_name) | ||
->Get<framework::LoDTensor>(); |
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.
Is this used to fetch the variable in the local scope?
// Create local scopes. | ||
for (auto &scope : member_->local_scopes_) { | ||
Scope &local_scope = scope->NewScope(); | ||
*scope->Var(details::kLocalExecScopeName)->GetMutable<Scope *>() = |
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.
What is usefule of scope->Var(details::kLocalExecScopeName)
? Please add comments.
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.
Currently, all non-persistable variables will be in the 'sub-scope of local scope'. The sub-scope is created before batch training and deleted after batch training.
… feature/drop_internal_scope_time_by_time
… feature/drop_internal_scope_time_by_time
No description provided.