-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
check for first or last stage #6708
Conversation
Signed-off-by: ericharper <complex451@gmail.com>
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!
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.
Looks good. just one comment.
compute_prob_response['offsets'] = offsets | ||
return compute_prob_response | ||
if ( | ||
not parallel_state.model_parallel_is_initialized() |
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.
why we need this condition not parallel_state.model_parallel_is_initialized()
?
if the model_parallel is not initialized, it will throw an exception at the very beginning right?
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.
I was just trying to make it robust. This method will only be called after parallel_state is initialized?
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.
this parallel_state.model_parallel_is_initialized()
method will always be true after parallel init.
def model_parallel_is_initialized():
"""Check if model and data parallel groups are initialized."""
if _TENSOR_MODEL_PARALLEL_GROUP is None or \
_PIPELINE_MODEL_PARALLEL_GROUP is None or \
_DATA_PARALLEL_GROUP is None:
return False
return True
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.
I mean will this method ever be used without model parallel init?
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. it is only used with model parallel.
Signed-off-by: ericharper <complex451@gmail.com>
Signed-off-by: ericharper <complex451@gmail.com>
* check for first or last stage Signed-off-by: ericharper <complex451@gmail.com> * remove redundant check Signed-off-by: ericharper <complex451@gmail.com> * fix typo Signed-off-by: ericharper <complex451@gmail.com> * add map_location Signed-off-by: ericharper <complex451@gmail.com> --------- Signed-off-by: ericharper <complex451@gmail.com>
* check for first or last stage * remove redundant check * fix typo * add map_location --------- Signed-off-by: ericharper <complex451@gmail.com> Co-authored-by: Eric Harper <complex451@gmail.com> Signed-off-by: hsiehjackson <c2hsieh@ucsd.edu>
* check for first or last stage Signed-off-by: ericharper <complex451@gmail.com> * remove redundant check Signed-off-by: ericharper <complex451@gmail.com> * fix typo Signed-off-by: ericharper <complex451@gmail.com> * add map_location Signed-off-by: ericharper <complex451@gmail.com> --------- Signed-off-by: ericharper <complex451@gmail.com>
What does this PR do ?
Fix bug when
inference.compute_logprob=True
. Only first and last pipeline stages have a response.Collection: NLP
Changelog
Usage
# Add a code snippet demonstrating how to use this
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information