Skip to content

Conversation

@SeanNaren
Copy link
Contributor

@SeanNaren SeanNaren commented Sep 13, 2021

What does this PR do?

Fixes #9394

By introducing partition_module, the user is able to turn of the explicit conversion of the entire module. This leaves DeepSpeed to do the conversion itself.

The reason in most cases its best to do it upfront, is because we can control the parameters passed to the initialisation + if the user defines layers in configure_sharded_model we can also ensure all other layers are converted (Which is a requirement).

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@SeanNaren SeanNaren changed the title Remove the module wrap, forcing all the module to be partitioned outs… Remove explicit ZeRO Stage 3 module wrapping Sep 13, 2021
@SeanNaren SeanNaren changed the title Remove explicit ZeRO Stage 3 module wrapping Introduce parameter to fix deepspeed crash for RNNS Sep 14, 2021
@SeanNaren SeanNaren added this to the v1.4.x milestone Sep 14, 2021
@SeanNaren SeanNaren added the bug Something isn't working label Sep 14, 2021
@SeanNaren SeanNaren self-assigned this Sep 14, 2021
@SeanNaren SeanNaren marked this pull request as ready for review September 14, 2021 10:24
@SeanNaren
Copy link
Contributor Author

I did look into the possibility of automating this. However within DeepSpeed the conversion happens without passing necessary information to do the conversion: https://github.com/microsoft/DeepSpeed/blob/master/deepspeed/runtime/zero/stage3.py#L663

Thus we need to do this beforehand to ensure we setup correctly.

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGMT !

@mergify mergify bot added ready PRs ready to be merged and removed has conflicts labels Sep 14, 2021
@SeanNaren SeanNaren merged commit 4cd6353 into master Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RNN training fails with DeepSpeed

4 participants