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

Support bitwise allreduce in NCCL communicator #9300

Merged
merged 5 commits into from
Jun 16, 2023

Conversation

rongou
Copy link
Contributor

@rongou rongou commented Jun 14, 2023

Use AllGather to collect all the data first, then do the bitwise allreduce locally.

@rongou
Copy link
Contributor Author

rongou commented Jun 14, 2023

@trivialfis

@trivialfis
Copy link
Member

Apologies for the oversight, the no_sync is a CTK-12 feature.

@rongou
Copy link
Contributor Author

rongou commented Jun 15, 2023

Switched to use LaunchN.

nccl_unique_id_ = GetUniqueId();
dh::safe_cuda(cudaSetDevice(device_ordinal_));
dh::safe_nccl(ncclCommInitRank(&nccl_comm_, world, nccl_unique_id_, rank));
dh::safe_cuda(cudaStreamCreate(&cuda_stream_));
Copy link
Member

Choose a reason for hiding this comment

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

Just a side note, there's dh::CUDAStream, which is a RAII version of async stream.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to it.

@trivialfis trivialfis merged commit d8beb51 into dmlc:master Jun 16, 2023
1 check passed
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.

2 participants