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

feat: add barrier api #290

Merged
merged 4 commits into from
Oct 15, 2021
Merged

feat: add barrier api #290

merged 4 commits into from
Oct 15, 2021

Conversation

wangraying
Copy link
Member

No description provided.


with torch.cuda.stream(comm.cuda_stream):
tensor = torch.Tensor([1.0]).cuda()
comm.allreduce_inplace(tensor.to_bagua_tensor().bagua_backend_tensor(), int(ReduceOp.SUM))
Copy link
Contributor

Choose a reason for hiding this comment

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

using broadcast is faster

@@ -28,6 +28,7 @@
"allreduce", "allreduce_inplace", "allgather", "allgather_inplace",
"gather", "gather_inplace", "scatter", "scatter_inplace",
"reduce_scatter", "reduce_scatter_inplace", "alltoall", "alltoall_inplace"
"barrier"
Copy link
Contributor

Choose a reason for hiding this comment

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

missing ,

@NOBLES5E NOBLES5E merged commit 820b1be into master Oct 15, 2021
@NOBLES5E NOBLES5E deleted the barrier branch October 15, 2021 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants