Skip to content

Commit

Permalink
[C10D] Document 'tag' limitation for nccl send/recv (#125278)
Browse files Browse the repository at this point in the history
Existing documentation on isend/irecv also applies to send/recv. This PR
copies the doc/warning to send/recv ops as well.

Note: tag may be supplied, but will be ignored when used with nccl
backend.

Fixes #94819 #125079

Pull Request resolved: #125278
Approved by: https://github.com/kwen2501
  • Loading branch information
wconstab authored and pytorchmergebot committed May 1, 2024
1 parent 74e8817 commit 8f31988
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions torch/distributed/distributed_c10d.py
Expand Up @@ -1878,6 +1878,9 @@ def send(tensor: torch.Tensor, dst: int, group: Optional[ProcessGroup] = None, t
"""
Send a tensor synchronously.
.. warning::
``tag`` is not supported with the NCCL backend.
Args:
tensor (Tensor): Tensor to send.
dst (int): Destination rank on global process group (regardless of ``group`` argument).
Expand Down Expand Up @@ -1913,6 +1916,9 @@ def recv(tensor: torch.Tensor, src: Optional[int] = None, group: Optional[Proces
"""
Receives a tensor synchronously.
.. warning::
``tag`` is not supported with the NCCL backend.
Args:
tensor (Tensor): Tensor to fill with received data.
src (int, optional): Source rank on global process group (regardless of ``group`` argument).
Expand Down

0 comments on commit 8f31988

Please sign in to comment.