Skip to content

Support torch.distributed.scatter collective#9365

Merged
bfolie merged 8 commits intomasterfrom
bfolie/9314-scatter
Jun 24, 2025
Merged

Support torch.distributed.scatter collective#9365
bfolie merged 8 commits intomasterfrom
bfolie/9314-scatter

Conversation

@bfolie
Copy link
Copy Markdown
Collaborator

@bfolie bfolie commented Jun 16, 2025

#9315

XLA doesn't have a distributed Scatter op but we can put dummy tensor lists on the non-source rank and use reduce_scatter

@bfolie bfolie requested review from bhavya01 and pgmoka June 16, 2025 17:02
Comment thread test/test_torch_distributed_xla_backend.py
Copy link
Copy Markdown
Collaborator

@pgmoka pgmoka left a comment

Choose a reason for hiding this comment

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

Mostly questions, and a requests for extra documentation

Comment thread torch_xla/distributed/xla_backend.py
Comment thread torch_xla/distributed/xla_backend.py
Comment thread torch_xla/distributed/xla_backend.py
Comment thread test/test_torch_distributed_xla_backend.py
Comment thread test/pjrt/test_collective_ops_tpu.py Outdated
Comment thread test/pjrt/test_collective_ops_tpu.py
Comment thread test/pjrt/test_collective_ops_tpu.py
@bfolie bfolie requested review from ghpvnist and pgmoka June 18, 2025 17:32
Comment thread test/pjrt/test_collective_ops_tpu.py
Copy link
Copy Markdown
Collaborator

@pgmoka pgmoka left a comment

Choose a reason for hiding this comment

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

Follow-up seems good. Let me know if you have any questions on https://github.com/pytorch/xla/pull/9365/files#r2151351304.

Otherwise, LGTM

Copy link
Copy Markdown
Collaborator

@pgmoka pgmoka left a comment

Choose a reason for hiding this comment

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

Follow-up seems good. Let me know if you have any questions on https://github.com/pytorch/xla/pull/9365/files#r2151351304.

Otherwise, LGTM.

One minor thing: I believe the tests failing are due to flakyness. Can you confirm?

@bfolie
Copy link
Copy Markdown
Collaborator Author

bfolie commented Jun 24, 2025

One minor thing: I believe the tests failing are due to flakyness. Can you confirm?

The TPU test failure is a known flake and was cleared up by re-running.

The Torchprime e2e test failure is probably real but because PRs from forks aren't exercising that test it's very difficult to tell where the failure comes from

@bfolie bfolie merged commit 01db65d into master Jun 24, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants