Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[p2p]add object list send/recv #1024

Merged

Conversation

YuliangLiu0306
Copy link
Contributor

No description provided.

Comment on lines 180 to 182
for tensor_send in object_send_next:
send_next_op = dist.P2POp(dist.isend, tensor_send, next_rank)
ops.append(send_next_op)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Torch has this API torch.distributed.broadcast_object_list, not sure how the performance is like compared to a list of P2P Op.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API broadcast_object_list sends the data to all ranks in group. I think this pr is something like send/recv_object_list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One way to do this is to create a process group for each pair of adjacent stages, and broadcast from one rank to the other rank in this process group.

@FrankLeeeee FrankLeeeee merged commit 7106bd6 into hpcaitech:main May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants