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

Fix MPMD detected error during training with TP #648

Merged
merged 5 commits into from
Jul 5, 2024
Merged

Conversation

michaelbenayoun
Copy link
Member

@michaelbenayoun michaelbenayoun commented Jul 3, 2024

What does this PR do?

This PR tries to fix the issue reported here aws-neuron/neuronx-distributed#24.

It seems to be linked to torch.autocast:

  • Before this PR, when it was supposed to be disabled we would do: with torch.autocast(enabled=False):
  • Now we do: with contexlib.nullcontex():.

For some reason the first approach was leading to different cores trying to execute different graphs, leading to the MPMD detected error.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@michaelbenayoun michaelbenayoun marked this pull request as ready for review July 3, 2024 16:35
Copy link
Collaborator

@dacorvo dacorvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks !

@michaelbenayoun michaelbenayoun merged commit 281bad8 into main Jul 5, 2024
10 of 12 checks passed
@michaelbenayoun michaelbenayoun deleted the fix_mpmd branch July 5, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants