From 8e6e2a8dbd1d2dfbb3e7614bfdd5377613906d2a Mon Sep 17 00:00:00 2001 From: Will Constable Date: Tue, 30 Apr 2024 16:50:25 -0700 Subject: [PATCH] [C10D] Document 'tag' limitation for nccl send/recv (#125278) 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: https://github.com/pytorch/pytorch/pull/125278 Approved by: https://github.com/kwen2501 --- torch/distributed/distributed_c10d.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/torch/distributed/distributed_c10d.py b/torch/distributed/distributed_c10d.py index 2b5461d0bc33..74f2ed5845a2 100644 --- a/torch/distributed/distributed_c10d.py +++ b/torch/distributed/distributed_c10d.py @@ -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). @@ -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).