From ce5dca1bdf26572bc67e9b10f29149c24694fad8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:31:44 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/unittests/bases/test_ddp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unittests/bases/test_ddp.py b/tests/unittests/bases/test_ddp.py index 5af7123e942..68e9286421b 100644 --- a/tests/unittests/bases/test_ddp.py +++ b/tests/unittests/bases/test_ddp.py @@ -172,6 +172,7 @@ def _test_ddp_gather_autograd_same_shape(rank: int, worldsize: int = NUM_PROCESS This test only considers tensors of the same shape across different ranks. Note that this test only works for torch>=2.0. + """ tensor = torch.ones(50, requires_grad=True) result = gather_all_tensors(tensor) @@ -198,6 +199,7 @@ def _test_ddp_gather_autograd_different_shape(rank: int, worldsize: int = NUM_PR This test considers tensors of different shapes across different ranks. Note that this test only works for torch>=2.0. + """ tensor = torch.ones(rank + 1, 2 - rank, requires_grad=True) result = gather_all_tensors(tensor)