Skip to content

Commit

Permalink
Update on "[C10D] Support group ranks in P2POp and batch_isend_irecv"
Browse files Browse the repository at this point in the history
Changes semantic of __repr__ of P2POp: s, d are now group ranks instead
of global ranks. I think this is OK since I also updated the field names
to make this obvious.

Also add mypy annotations

Partially addresses RFC 0042 (pytorch/rfcs#71)
See more details/motivation in #140460

cc H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 d4l3k c-p-i-o

[ghstack-poisoned]
  • Loading branch information
wconstab committed Nov 20, 2024
1 parent a5b421c commit 4a79049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/distributed/distributed_c10d.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ def __init__(
"""Init."""
self.op = op
self.tensor = tensor
self.group = _group_or_default_group(group)
self.peer = _canonicalize_group_rank(
self.group, peer, group_peer, return_global=True
)
self.group = _group_or_default_group(group)
self.tag = tag
self.group_peer = _canonicalize_group_rank(self.group, peer, group_peer)

Expand Down

0 comments on commit 4a79049

Please sign in to comment.