Skip to content

Conversation

@jamesr66a
Copy link
Collaborator

Previously, _need_to_materialize_module would return false because:

  • managed_params =_get_orig_params(module, ignored_params) returns a generator
  • is_meta_module = any(param.is_meta for param in managed_params) exhausts the generator in its check
  • any(fake.is_fake(param) for param in managed_params) would try to iterate over the empty generator and get an empty sequence, thus returning False

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 23, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/97488

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 723f8b9:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: distributed (fsdp) release notes category label Mar 23, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 23, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jamesr66a / name: James Reed (723f8b9)

@ngimel
Copy link
Collaborator

ngimel commented Mar 24, 2023

Test?

Copy link
Collaborator

@awgu awgu left a comment

Choose a reason for hiding this comment

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

Great catch! Thanks!

@jamesr66a
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 25, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@github-actions github-actions bot deleted the fix_materialize_check branch September 23, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: distributed (fsdp) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants