Skip to content

set pg name based on ranks#166182

Closed
tushar00jain wants to merge 1 commit intomainfrom
pr166182
Closed

set pg name based on ranks#166182
tushar00jain wants to merge 1 commit intomainfrom
pr166182

Conversation

@tushar00jain
Copy link
Contributor

@tushar00jain tushar00jain commented Oct 24, 2025

Summary:

  • in torchft we have multiple default pg's, 1 for each task group
  • for flight recorder to work, each of these need to have a different name, so entries can be matched
  • change the init_process_group api to optionally take a list of ranks. if provided, we use the hash of the ranks as the name of the pg. for torchft, we'll pass global ranks here so the default pg have a different name on each task group

cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 24, 2025

🔗 Helpful Links

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

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

❗ 2 Active SEVs

There are 2 currently active SEVs. If your PR is affected, please view them below:

✅ You can merge normally! (1 Unrelated Failure)

As of commit 588f15c with merge base 0b68814 (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot pytorch-bot bot added oncall: distributed Add this issue/PR to distributed oncall triage queue release notes: distributed (c10d) release notes category labels Oct 24, 2025
@tushar00jain tushar00jain requested a review from fduwjj October 24, 2025 19:19
@tushar00jain tushar00jain marked this pull request as ready for review October 24, 2025 19:19
Copy link
Contributor

@fduwjj fduwjj left a comment

Choose a reason for hiding this comment

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

I think this change looks weird to me. Any chance we can do that inside torchft?

@tushar00jain
Copy link
Contributor Author

@fduwjj can't really, the name is set at init time. FR also takes it at init time. The change is backward compatible, so it shouldn't really cause any issues i.e. the code without the ranks argument

@fduwjj
Copy link
Contributor

fduwjj commented Oct 27, 2025

@tushar00jain I mean after you call init_process_group, you can always change pg name right?

@tushar00jain
Copy link
Contributor Author

@fduwjj it's tricky and i'm not sure if that's a good idea. some places use the name inside the init, FR is one example. if those places use the name and we change the name later, it doesn't really help

Summary:
- in torchft we have multiple default pg's, 1 for each task group
- for flight recorder to work, each of these need to have a different name, so entries can be matched
- change the `init_process_group` api to optionally take a list of ranks. if provided, we use the hash of the ranks as the name of the pg. for torchft, we'll pass global ranks here so the default pg have a different name on each task group
@tushar00jain
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 29, 2025
@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

BoyuanFeng pushed a commit that referenced this pull request Oct 31, 2025
Summary:
- in torchft we have multiple default pg's, 1 for each task group
- for flight recorder to work, each of these need to have a different name, so entries can be matched
- change the `init_process_group` api to optionally take a list of ranks. if provided, we use the hash of the ranks as the name of the pg. for torchft, we'll pass global ranks here so the default pg have a different name on each task group

Pull Request resolved: #166182
Approved by: https://github.com/fduwjj
@github-actions github-actions bot deleted the pr166182 branch November 29, 2025 02:16
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 release notes: distributed (c10d) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants