Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add barrier api#290

Merged
NOBLES5E merged 4 commits into
masterfrom
barrier
Oct 15, 2021
Merged

feat: add barrier api#290
NOBLES5E merged 4 commits into
masterfrom
barrier

Conversation

@wangraying
Copy link
Copy Markdown
Member

No description provided.

Comment thread bagua/torch_api/communication.py Outdated

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
Copy Markdown
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

"allreduce", "allreduce_inplace", "allgather", "allgather_inplace",
"gather", "gather_inplace", "scatter", "scatter_inplace",
"reduce_scatter", "reduce_scatter_inplace", "alltoall", "alltoall_inplace"
"barrier"
Copy link
Copy Markdown
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