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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hsdp_device_mesh=None when enable HSDP and HYBRID_SHARD #402

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haozhx23
Copy link

What does this PR do?

Fixes # A variable hsdp_device_mesh is assigned None before the same-name function hsdp_device_mesh() is called, when hsdp and HYBRID_SHARD are both set. Change the variable hsdp_device_mesh to hsdp_device_mesh_plan to avoid conflict.

Feature/Issue validation/testing

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test 1
    TypeError("'NoneType' object is not callable") fixed.

  • An error from torch/distributed/fsdp/_init_utils.py L107 will be triggered.

            "Cannot pass both process_group and device_mesh at the "
            "same time. Please just pass only one of them."

As neither process_group or device_mesh is None. With a temporary modification, the training will proceed (with both HSDP and HYBRID_SHARD enabled)

鍥剧墖

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Thanks for contributing 馃帀!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants