Skip to content

DDP hook skips on 2.0 branch. #1335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions torch/testing/_internal/distributed/distributed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4493,6 +4493,10 @@ def _test_ddp_hook_with_optimizer_parity(
BACKEND == "nccl" or BACKEND == "ucc",
"Issues with async error handling, see https://github.com/pytorch/pytorch/issues/73259"
)
@sandcastle_skip_if(
BACKEND == "gloo" and HAS_TORCHVISION,
"Failing with gloo backend + torchvision due to ongoing issue https://github.com/pytorch/pytorch/issues/111834",
)
@skip_if_lt_x_gpu(2)
@parametrize("grad_as_bucket_view", [True, False])
@parametrize("static_graph", [True, False])
Expand Down Expand Up @@ -4520,6 +4524,10 @@ def test_ddp_hook_with_optimizer_parity_adamw(
BACKEND == "nccl" or BACKEND == "ucc",
"Issues with async error handling, see https://github.com/pytorch/pytorch/issues/73259"
)
@sandcastle_skip_if(
BACKEND == "gloo" and HAS_TORCHVISION,
"Failing with gloo backend + torchvision due to ongoing issue https://github.com/pytorch/pytorch/issues/111834",
)
@skip_if_lt_x_gpu(2)
@parametrize("optimize_subset", [True, False])
def test_ddp_hook_with_optimizer_parity_adam(self, optimize_subset):
Expand All @@ -4540,6 +4548,10 @@ def test_ddp_hook_with_optimizer_parity_adam(self, optimize_subset):
BACKEND == "nccl" or BACKEND == "ucc",
"Issues with async error handling, see https://github.com/pytorch/pytorch/issues/73259"
)
@sandcastle_skip_if(
BACKEND == "gloo" and HAS_TORCHVISION,
"Failing with gloo backend + torchvision due to ongoing issue https://github.com/pytorch/pytorch/issues/111834",
)
@skip_if_lt_x_gpu(2)
@parametrize("optimize_subset", [True, False])
def test_ddp_hook_with_optimizer_parity_sgd(self, optimize_subset):
Expand Down Expand Up @@ -4629,8 +4641,11 @@ def _test_ddp_apply_optim_in_backward(
# case.
optim.zero_grad(set_to_none=True)

@skip_if_rocm
@skip_if_lt_x_gpu(2)
@sandcastle_skip_if(
BACKEND == "gloo" and HAS_TORCHVISION,
"Failing with gloo backend + torchvision due to ongoing issue https://github.com/pytorch/pytorch/issues/111834",
)
def test_ddp_apply_optim_in_backward(self):
for optim_cls in [torch.optim.SGD, torch.optim.Adam]:
with self.subTest(optim_cls=optim_cls):
Expand All @@ -4639,8 +4654,11 @@ def test_ddp_apply_optim_in_backward(self):
optim_kwargs={"lr": 0.03}
)

@skip_if_rocm
@skip_if_lt_x_gpu(2)
@sandcastle_skip_if(
BACKEND == "gloo" and HAS_TORCHVISION,
"Failing with gloo backend + torchvision due to ongoing issue https://github.com/pytorch/pytorch/issues/111834",
)
def test_ddp_apply_optim_in_backward_grad_as_bucket_view_false(self):
self._test_ddp_apply_optim_in_backward(
optim_cls=torch.optim.SGD,
Expand Down