Gromacs
2021-beta3-UNCHECKED
|
#include "gromacs/gpu_utils/gpu_macros.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/locality.h"
#include "gromacs/nbnxm/atomdata.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
Declare interface for GPU execution for NBNXN module.
Enumerations | |
enum | eelType : int { eelTypeCUT, eelTypeRF, eelTypeEWALD_TAB, eelTypeEWALD_TAB_TWIN, eelTypeEWALD_ANA, eelTypeEWALD_ANA_TWIN, eelTypeNR } |
Nbnxm electrostatic GPU kernel flavors. More... | |
enum | evdwType : int { evdwTypeCUT, evdwTypeCUTCOMBGEOM, evdwTypeCUTCOMBLB, evdwTypeFSWITCH, evdwTypePSWITCH, evdwTypeEWALDGEOM, evdwTypeEWALDLB, evdwTypeNR } |
Nbnxm VdW GPU kernel flavors. More... | |
Functions | |
static bool | Nbnxm::useLjCombRule (const int vdwType) |
Returns true if LJ combination rules are used in the non-bonded kernels. More... | |
void | Nbnxm::gpu_copy_xq_to_gpu (NbnxmGpu *nb, const struct nbnxn_atomdata_t *nbdata, gmx::AtomLocality aloc) |
Launch asynchronously the xq buffer host to device copy. More... | |
void | Nbnxm::gpu_launch_kernel (NbnxmGpu *nb, const gmx::StepWorkload &stepWork, gmx::InteractionLocality iloc) |
Launch asynchronously the nonbonded force calculations. More... | |
void | Nbnxm::gpu_launch_kernel_pruneonly (NbnxmGpu *nb, gmx::InteractionLocality iloc, int numParts) |
Launch asynchronously the nonbonded prune-only kernel. More... | |
void | Nbnxm::gpu_launch_cpyback (NbnxmGpu *nb, nbnxn_atomdata_t *nbatom, const gmx::StepWorkload &stepWork, gmx::AtomLocality aloc) |
Launch asynchronously the download of short-range forces from the GPU (and energies/shift forces if required). | |
bool | Nbnxm::gpu_try_finish_task (NbnxmGpu *nb, const gmx::StepWorkload &stepWork, gmx::AtomLocality aloc, real *e_lj, real *e_el, gmx::ArrayRef< gmx::RVec > shiftForces, GpuTaskCompletion completionKind, gmx_wallcycle *wcycle) |
Attempts to complete nonbonded GPU task. More... | |
float | Nbnxm::gpu_wait_finish_task (NbnxmGpu *nb, const gmx::StepWorkload &stepWork, gmx::AtomLocality aloc, real *e_lj, real *e_el, gmx::ArrayRef< gmx::RVec > shiftForces, gmx_wallcycle *wcycle) |
Completes the nonbonded GPU task blocking until GPU tasks and data transfers to finish. More... | |
void | Nbnxm::nbnxn_gpu_init_x_to_nbat_x (const Nbnxm::GridSet &gridSet, NbnxmGpu *gpu_nbv) |
Initialization for X buffer operations on GPU. Called on the NS step and performs (re-)allocations and memory copies. ! | |
void | Nbnxm::nbnxn_gpu_x_to_nbat_x (const Nbnxm::Grid &grid, bool setFillerCoords, NbnxmGpu *gpu_nbv, DeviceBuffer< gmx::RVec > d_x, GpuEventSynchronizer *xReadyOnDevice, gmx::AtomLocality locality, int gridId, int numColumnsMax) |
X buffer operations on GPU: performs conversion from rvec to nb format. More... | |
void | Nbnxm::nbnxnInsertNonlocalGpuDependency (const NbnxmGpu *nb, gmx::InteractionLocality interactionLocality) |
Sync the nonlocal stream with dependent tasks in the local queue. More... | |
void | Nbnxm::setupGpuShortRangeWork (NbnxmGpu *nb, const gmx::GpuBonded *gpuBonded, gmx::InteractionLocality iLocality) |
Set up internal flags that indicate what type of short-range work there is. More... | |
bool | Nbnxm::haveGpuShortRangeWork (const NbnxmGpu *nb, gmx::AtomLocality aLocality) |
Returns true if there is GPU short-range work for the given atom locality. More... | |
void | Nbnxm::nbnxn_wait_x_on_device (NbnxmGpu *nb) |
sync CPU thread on coordinate copy to device More... | |
void * | Nbnxm::getGpuForces (NbnxmGpu *nb) |
Get the pointer to the GPU nonbonded force buffer. More... | |
enum eelType : int |
Nbnxm electrostatic GPU kernel flavors.
Types of electrostatics implementations available in the GPU non-bonded force kernels. These represent both the electrostatics types implemented by the kernels (cut-off, RF, and Ewald - a subset of what's defined in enums.h) as well as encode implementation details analytical/tabulated and single or twin cut-off (for Ewald kernels). Note that the cut-off and RF kernels have only analytical flavor and unlike in the CPU kernels, the tabulated kernels are ATM Ewald-only.
The row-order of pointers to different electrostatic kernels defined in nbnxn_cuda.cu by the nb_*_kfunc_ptr function pointer table should match the order of enumerated types below.
enum evdwType : int |
Nbnxm VdW GPU kernel flavors.
The enumerates values correspond to the LJ implementations in the GPU non-bonded kernels.
The column-order of pointers to different electrostatic kernels defined in nbnxn_cuda_ocl.cpp/.cu by the nb_*_kfunc_ptr function pointer table should match the order of enumerated types below.