KEMBAR78
Fix a bug of distributed 'gather' with noncontiguous tensors on the NCCL backend. by tiandeyu-cs · Pull Request #159549 · pytorch/pytorch · GitHub
Skip to content

Conversation

@tiandeyu-cs
Copy link
Contributor

@tiandeyu-cs tiandeyu-cs commented Jul 31, 2025

Fixes #159548

  • Throw an error message when the input tensors for the distributed gather are noncontiguous. This behaviour is consistent with the distributed all_gather.

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

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 31, 2025

🔗 Helpful Links

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

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

⏳ 1 Pending, 1 Unrelated Failure

As of commit 829e141 with merge base 42a69f7 (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 Jul 31, 2025
Copy link
Member

@d4l3k d4l3k left a comment

Choose a reason for hiding this comment

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

LGTM

might be nice to add unit test

@d4l3k
Copy link
Member

d4l3k commented Jul 31, 2025

@pytorchbot merge

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

@tiandeyu-cs
Copy link
Contributor Author

I would be glad to add some unit tests for the bug, but I am not familiar with the testing framework and do not know where to start. :(

yangw-dev pushed a commit that referenced this pull request Aug 1, 2025
…CCL backend. (#159549)

Fixes #159548

* Throw an error message when the input tensors for the distributed `gather` are noncontiguous. This behaviour is consistent with the distributed `all_gather`.

Pull Request resolved: #159549
Approved by: https://github.com/d4l3k
@guangyey
Copy link
Collaborator

guangyey commented Aug 2, 2025

cc @zhangxiaoli73 @Chao1Han I think the xccl backend needs this fix as well...

@zhangxiaoli73
Copy link
Contributor

@Chao1Han Please help check.

cc @zhangxiaoli73 @Chao1Han I think the xccl backend needs this fix as well...

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 open source release notes: distributed (c10d) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Distributed 'gather' with the NCCL backend returns wrong results on noncontiguous tensors.

6 participants