Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/feature-allgather…
Browse files Browse the repository at this point in the history
…-tensors-with-different-shapes' into feature-allgather-tensors-with-different-shapes
  • Loading branch information
sadra-barikbin committed Sep 4, 2024
2 parents 988ec06 + 7ac690a commit 9501489
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ignite/distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,11 @@ def all_gather_tensors_with_shapes(
"""Helper method to 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
``torch.distributed.all_gather_object()``, otherwise this method is quite faster.
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 can use
``torch.distributed.all_gather_object``, otherwise this method is quite faster.
Examples:
.. code-block:: python
import ignite.distributed as idist
Expand All @@ -387,7 +386,7 @@ def all_gather_tensors_with_shapes(
Args:
tensor: tensor to collect across participating processes.
shapes: A sequence containing the shape of participating processes' ``tensor``s.
shapes: A sequence containing the shape of participating processes' ``tensor`` s.
group: list of integer or the process group for each backend. If None, the default process group will be used.
Returns:
Expand Down

0 comments on commit 9501489

Please sign in to comment.