Commit Graph

15 Commits

Author SHA1 Message Date
Xilun Wu
cbb03e6971 [BE][DTensor] move torch.distributed._tensor import to torch.distributed.tensor in test files (#153225)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/153225
Approved by: https://github.com/kwen2501, https://github.com/fegin
2025-05-09 20:40:54 +00:00
Aaron Gokaslan
f3304571fc [BE][Ez]: FURB148 - remove useless enumerate calls (#145619)
Remove useless enumerate calls

Pull Request resolved: https://github.com/pytorch/pytorch/pull/145619
Approved by: https://github.com/drisspg
2025-01-24 23:37:15 +00:00
Xuehai Pan
db3290846e [BE][Easy][10/19] enforce style for empty lines in import segments in test/d*/ (#129761)
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501. Most changes are auto-generated by linter.

You can review these PRs via:

```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129761
Approved by: https://github.com/fegin
2024-07-17 16:57:39 +00:00
Yuanhao Ji
e3effa5855 Enable UFMT on all of test/distributed (#123539)
Partially addresses #123062

Ran lintrunner on:

- `test/distributed`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/123539
Approved by: https://github.com/ezyang
2024-04-17 06:46:02 +00:00
PyTorch MergeBot
52be63eb2c Revert "Enable UFMT on all of test/distributed (#123539)"
This reverts commit 89ac37fe91.

Reverted https://github.com/pytorch/pytorch/pull/123539 on behalf of https://github.com/DanilBaibak due to Broken trunk ([comment](https://github.com/pytorch/pytorch/pull/123539#issuecomment-2058329471))
2024-04-16 06:33:21 +00:00
Yuanhao Ji
89ac37fe91 Enable UFMT on all of test/distributed (#123539)
Partially addresses #123062

Ran lintrunner on:

- `test/distributed`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/123539
Approved by: https://github.com/ezyang
2024-04-16 03:23:56 +00:00
Tianyu Liu
8ae3835323 further deprecate PairwiseParallel and SequenceParallel from test (#114402)
**Remaining Issue**
When replace SequenceParallel, tests would pass even setting `input_layouts=Replicate()`. Still looking into it...

**Summary**
This is a follow-up PR to #114314.

**Test Plan**
`python test_files.py`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/114402
Approved by: https://github.com/wanchaol
2023-11-30 05:06:08 +00:00
Iris Zhang
72ce5dd13e [2D] Remove enable_2d_with_fsdp() API and make remove_enable_2d_with_fsdp private (#112473)
As we have our new 2D flow out, we want to remove `enable_2d_with_fsdp()`.
In addition, we change pre_dp_module_transform to private, as we may need to change the UX later on.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/112473
Approved by: https://github.com/fegin, https://github.com/wanchaol
2023-11-16 01:14:00 +00:00
wz337
5ea76f1760 [DeviceMesh][Test] Update 2D related test to use init_device_mesh (#113236)
This PR:
1. Update all 2d related test to use DeviceMesh and remove `tp_mesh_dim` from TP calls.
2. Remove `test_fsdp_tp_checkpoint_integration` from `test/distributed/fsdp/test_fsdp_tp_integration.py` as checkpointing tests are covered in https://github.com/pytorch/pytorch/blob/main/test/distributed/tensor/parallel/test_fsdp_2d_parallel.py#L330

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113236
Approved by: https://github.com/wanchaol, https://github.com/fduwjj, https://github.com/fegin
2023-11-08 18:41:50 +00:00
Simon Fan
c2ac0da445 Enhance fakepg: add fsdp+tp tests (#107626)
from working on a starter task with @wanchaol (T161350434):
Add the previously unsupported fsdp+tp example in FakePG, which required scatter and broadcast, as a unit test: https://github.com/pytorch/examples/blob/main/distributed/tensor_parallelism/two_d_parallel_example.py
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107626
Approved by: https://github.com/wanchaol
ghstack dependencies: #107625
2023-08-25 06:17:54 +00:00
Simon Fan
870fa460be Enhance fakepg: send and recv (#107625)
from working on a starter task with @wanchaol (T161350434):
Enhance Fake Process Group by adding missing collectives: send, recv
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107625
Approved by: https://github.com/fduwjj, https://github.com/wanchaol
2023-08-24 22:06:34 +00:00
Simon Fan
b74b8e33db [Redo] Enhance fakepg: alltoall and alltoall_base (#107798)
[ghstack-poisoned]

Redo https://github.com/pytorch/pytorch/pull/107624, previously tried to land via `ghstack land`, but that doesn't work with pytorch repo which has protected main branch. As a result, that PR was only merged to [gh/xmfan/1/base](https://github.com/pytorch/pytorch/tree/gh/xmfan/1/base).

This PR manually merges [gh/xmfan/1/base](https://github.com/pytorch/pytorch/tree/gh/xmfan/1/base) into main, via pytorchbot

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107798
Approved by: https://github.com/wanchaol, https://github.com/fduwjj
2023-08-23 23:45:11 +00:00
Simon Fan
302278b4d5 [pytorch][fakepg] enhance fakepg: broadcast and scatter (#107480)
Summary:
Add support for broadcast and scatter in FakeProcessGroup.

As a side note, we can't easily support broadcast_object_list or
scatter_object_list since they rely on actual broadcasted/scattered
values for pickle object deserialization. We could add support for rank 0, but
other to support ranks may need additional changes outside of
FakeProcessGroup.

Test Plan:
`buck2 run mode/dev-nosan -c fbcode.enable_gpu_sections=true
//caffe2/test/distributed:fake_pg`, on of TARGETS diff: D48481513

`python test/distributed/test_fake_pg.py` after github sync

Differential Revision: D48481512

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107480
Approved by: https://github.com/wanchaol
2023-08-19 02:36:45 +00:00
Wanchao Liang
7b47cd0a6c [c10d] add fake pg necessary collectives (#102238)
This PR adds fake pg necessary collectives to enable e2e FSDP run
with out multiprocess or multithreading
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102238
Approved by: https://github.com/ezyang
2023-05-25 05:01:16 +00:00
Edward Z. Yang
c903b12cb8 Add fake process group (#102180)
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102180
Approved by: https://github.com/wanchaol
2023-05-24 23:27:40 +00:00