Improve readability of dgrad overlap variable#3165
Conversation
Signed-off-by: Prachi Kushwaha <prachiku673@gmail.com>
e38a7d3 to
7a3a724
Compare
denera
left a comment
There was a problem hiding this comment.
layers_all_gather_overlap, layers_reduce_scatter_overlap and dgrad_reduce_scatter_overlap are all internal variables that are never exposed to the user. The first two layers_*_overlap lists encode the default comm overlap behavior while dgrad_reduce_scatter_overlap keeps track of which DGRAD GEMMs can optionally be overlapped with reduce-scatter instead of bulk all-gather.
I don't think the new layers_dgrad_ag_and_rs_overlap name in this PR is any more descriptive of how the variable is actually used in our internal workflow.
More importantly, focusing on the variable name is glossing over the actual deficiency — documentation.
The only reason why anyone goes digging in this source code and looks at these internal variables is because we are not telling the user what the default configuration is for each layer. The real solution to this problem is to update the initialize_ub() docstring with that missing information. That would enable users to supply partial config dictionaries that only modify what they want done differently than the default behavior.
So I would recommend that you either change this PR or close and file a new one to supply that docstring update. That would be a very valuable change to review and merge for us.
Description
Rename
dgrad_reduce_scatter_overlapto better reflect its purpose.Please include a brief summary of the changes, relevant motivation and context.
Fixes #3164
Type of change
Checklist: