GPU: Add GPU Baseline for ABACUS !#1535
Merged
Merged
Conversation
dyzheng
approved these changes
Nov 21, 2022
Qianruipku
approved these changes
Nov 22, 2022
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.
CUDA GPU implementations
In ABACUS, we provide the option to use the GPU devices to accelerate the performance. In the tested
si16_pwsystem, we have found an order of magnitude speedup compared with the CPU code.And it has the following general features:
Full gpu implementations: During the SCF progress,
Psi,Hamilt,Hsolver, andDiagCGclasses are stored or calculated by the GPU devices.Electronic state data: (e.g. electronic density) are moved from the GPU to the CPU(s) every SCF step.
Acclerated by the NVIDIA libraries:
cuBLASfor common linear algebra calculations,cuSolverfor eigen values/vectors, andcuFFTfor the conversions between the real and recip spaces.Multi GPU supprted: Using multiple MPI tasks will often give the best performance. Note each MPI task will be bind to a GPU device with automatically computing load balancing.
Parallel strategy: K point parallel.
Building ABACUS with the GPU support:
Check the Advanced Installation Options for the installation of CUDA version support.
Run with the GPU support by editing the INPUT script:
In
INPUTfile we need to set the value keyword device to begpu.Examples
We provides examples of gpu calculations.
Known limitations
ks_solvercan only take the valuecg,basis_typecan only take the valuepw,kparwill be set to match the number of MPI tasks automatically.