Skip to content

[PP] Allow larger world_size schedule tests - #160559

Closed
H-Huang wants to merge 5 commits into
gh/H-Huang/209/basefrom
gh/H-Huang/209/head
Closed

H-Huang wants to merge 5 commits into
gh/H-Huang/209/basefrom
gh/H-Huang/209/head

Conversation

@H-Huang

@H-Huang H-Huang commented Aug 13, 2025 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Update schedule tests to use world_size=4, changes needed:

  • Move some tests that require world_size=2 to new class
  • Move helper methods from class level to function level
  • Update some initialization to pass assert since gradients were super small.

cc @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta

[ghstack-poisoned]
@pytorch-bot pytorch-bot Bot added oncall: distributed Add this issue/PR to distributed oncall triage queue topic: not user facing topic category labels Aug 13, 2025
@pytorch-bot

pytorch-bot Bot commented Aug 13, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 14c6bab with merge base 9d37c96 (image):
💚 Looks good so far! There are no failures yet. 💚

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

H-Huang added a commit that referenced this pull request Aug 13, 2025
[ghstack-poisoned]
H-Huang added a commit that referenced this pull request Aug 13, 2025
@H-Huang
H-Huang requested review from kwen2501 and wconstab August 13, 2025 20:27
torch.nn.init.uniform_(self.fc2_weight, -0.01, 0.01)
torch.nn.init.uniform_(self.fc1_bias, -0.01, 0.01)
torch.nn.init.uniform_(self.fc2_bias, -0.01, 0.01)
torch.nn.init.uniform_(self.fc1_weight, -0.001, 0.001)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In only one of the tests we use this and the module weight initialization effects the scale of the gradients.

When I changed the test from 2->4 ranks, the gradients became super small like 1e-10 due to this initialization, making these weights smaller helps fix that.

[ghstack-poisoned]
H-Huang added a commit that referenced this pull request Aug 13, 2025
[ghstack-poisoned]
H-Huang added a commit that referenced this pull request Aug 14, 2025
[ghstack-poisoned]
@H-Huang H-Huang added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 14, 2025
@H-Huang

H-Huang commented Aug 14, 2025

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
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

can-gaa-hou pushed a commit to can-gaa-hou/pytorch that referenced this pull request Aug 22, 2025
Update schedule tests to use `world_size=4`, changes needed:
- Move some tests that require world_size=2 to new class
- Move helper methods from class level to function level
- Update some initialization to pass assert since gradients were super small.

Pull Request resolved: pytorch#160559
Approved by: https://github.com/wconstab
ghstack dependencies: pytorch#159591, pytorch#160558
@github-actions
github-actions Bot deleted the gh/H-Huang/209/head branch September 14, 2025 02:14
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
Update schedule tests to use `world_size=4`, changes needed:
- Move some tests that require world_size=2 to new class
- Move helper methods from class level to function level
- Update some initialization to pass assert since gradients were super small.

Pull Request resolved: pytorch#160559
Approved by: https://github.com/wconstab
ghstack dependencies: pytorch#159591, pytorch#160558
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 oncall: distributed Add this issue/PR to distributed oncall triage queue topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants