Multi-GPU communication using NCCL#39
Merged
Merged
Conversation
Updates nccl PR
wavefunction91
requested changes
Mar 13, 2021
wavefunction91
left a comment
Owner
There was a problem hiding this comment.
Looks great overall - I'll build on Summit to get some more concrete numbers for how this works at scale
| MPI_Comm_rank( this->comm_, &world_rank ); | ||
| MPI_Comm_size( this->comm_, &world_size ); | ||
|
|
||
| #ifdef GAUXC_ENABLE_NCCL |
Owner
There was a problem hiding this comment.
Looks like we might want to add a lifetime manager for ncclComm_t ala how we did cuda_stream, etc. We generally want to steer clear of explicit setup/teardown in the user space code
Contributor
Author
There was a problem hiding this comment.
Sounds good; I will also plan on adding a nccl_util.hpp file with similar functionality as magma_util.hpp. Do you think it makes more sense to store the ncclComm_t object in XCCudaData with the CUDA stream and magma queue, or in the DefaultXCCudaIntegrator since the MPI comm object seems to be at that level?
wavefunction91
approved these changes
Mar 25, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds support for NCCL (https://developer.nvidia.com/nccl) to do device-side multi-gpu communication, specifically the all-reduce. To make the feature optional, I tried to replicate the scheme used for MAGMA. It seems to work on my end, but please feel free to make suggestions/refactor it as you see fit.
I also moved the symmetrize matrix portion of the code to the device and separated the device-to-host transfer of
VXC,EXCandNELinto its own function.