Skip to content

Commit

Permalink
Update ignite/distributed/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: vfdev <[email protected]>
  • Loading branch information
sadra-barikbin and vfdev-5 committed Sep 4, 2024
1 parent 538f0c0 commit 7ac690a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ignite/distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ def all_reduce(
def all_gather_tensors_with_shapes(
tensor: torch.Tensor, shapes: Sequence[Sequence[int]], group: Optional[Union[Any, List[int]]] = None
) -> List[torch.Tensor]:
"""Gather tensors of possibly different shapes but with the same number of dimensions from across processes.
"""Gather tensors of possibly different shapes but with the same number of dimensions across processes.
This function gets the shapes of participating tensors as input so you should know them beforehand. If your tensors
are of different number of dimensions or you don't know their shapes beforehand, you could use
are of different number of dimensions or you don't know their shapes beforehand, you can use
`torch.distributed.all_gather_object()`, otherwise this method is quite faster.
Examples:
Expand Down

0 comments on commit 7ac690a

Please sign in to comment.