-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
split optimization ops on pserver to independenty blocks #10123
split optimization ops on pserver to independenty blocks #10123
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.
Thanks for fix this, the issue is introduced by #10027
|
||
# append global ops | ||
opt_state_block = None | ||
if global_ops: | ||
opt_state_block = pserver_program.create_block(per_opt_block.idx) | ||
for glb_op in global_ops: |
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.
can move inside if statement.
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.
done
|
||
# append op to the current block | ||
per_opt_block = append_block | ||
per_opt_block = None | ||
pre_block_idx = GLOBAL_BLOCK_IDX |
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.
No globals is needed here, just record the latest block id.
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.
done
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.
LGTM except one comment
@@ -25,6 +25,8 @@ | |||
LOOKUP_TABLE_GRAD_TYPE = "lookup_table_grad" | |||
RPC_CLIENT_VAR_NAME = "RPC_CLIENT_VAR" | |||
|
|||
GLOBAL_BLOCK_IDX = 0 |
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.
Can remove this line.
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.
Done
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.
Approve, can remove that line later.
tasks: #9941