Gromacs
2020-beta1
|
#include "gromacs/gpu_utils/gpu_macros.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/nbnxm/atomdata.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
#include "gpu_types.h"
#include "locality.h"
Declare interface for GPU execution for NBNXN module.
Functions | |
void | Nbnxm::gpu_copy_xq_to_gpu (gmx_nbnxn_gpu_t *nb, const struct nbnxn_atomdata_t *nbdata, AtomLocality aloc) |
Launch asynchronously the xq buffer host to device copy. More... | |
void | Nbnxm::gpu_launch_kernel (gmx_nbnxn_gpu_t *nb, const gmx::StepWorkload &stepWork, InteractionLocality iloc) |
Launch asynchronously the nonbonded force calculations. More... | |
void | Nbnxm::gpu_launch_kernel_pruneonly (gmx_nbnxn_gpu_t *nb, InteractionLocality iloc, int numParts) |
Launch asynchronously the nonbonded prune-only kernel. More... | |
void | Nbnxm::gpu_launch_cpyback (gmx_nbnxn_gpu_t *nb, nbnxn_atomdata_t *nbatom, const gmx::StepWorkload &stepWork, AtomLocality aloc, bool copyBackNbForce) |
Launch asynchronously the download of short-range forces from the GPU (and energies/shift forces if required). | |
bool | Nbnxm::gpu_try_finish_task (gmx_nbnxn_gpu_t *nb, const gmx::StepWorkload &stepWork, 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 (gmx_nbnxn_gpu_t *nb, const gmx::StepWorkload &stepWork, AtomLocality aloc, real *e_lj, real *e_el, gmx::ArrayRef< gmx::RVec > shiftForces, gmx_wallcycle *wcycle) |
Wait for the asynchronously launched nonbonded tasks and data transfers to finish. More... | |
int | Nbnxm::nbnxn_gpu_pick_ewald_kernel_type (const interaction_const_t &ic) |
Selects the Ewald kernel type, analytical or tabulated, single or twin cut-off. | |
void | Nbnxm::nbnxn_gpu_init_x_to_nbat_x (const Nbnxm::GridSet &gridSet, gmx_nbnxn_gpu_t *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_copy_x_to_gpu (const Nbnxm::Grid &grid, gmx_nbnxn_gpu_t *gpu_nbv, Nbnxm::AtomLocality locality, const rvec *coordinatesHost) |
Copy coordinates from host to device memory. More... | |
DeviceBuffer< float > | Nbnxm::nbnxn_gpu_get_x_gpu (gmx_nbnxn_gpu_t *gpu_nbv) |
Getter for the device coordinates buffer. More... | |
void | Nbnxm::nbnxn_gpu_x_to_nbat_x (const Nbnxm::Grid &grid, bool setFillerCoords, gmx_nbnxn_gpu_t *gpu_nbv, DeviceBuffer< float > coordinatesDevice, Nbnxm::AtomLocality locality, int gridId, int numColumnsMax) |
X buffer operations on GPU: performs conversion from rvec to nb format. More... | |
void | Nbnxm::nbnxnInsertNonlocalGpuDependency (const gmx_nbnxn_gpu_t *nb, InteractionLocality interactionLocality) |
Sync the nonlocal stream with dependent tasks in the local queue. More... | |
void | Nbnxm::setupGpuShortRangeWork (gmx_nbnxn_gpu_t *nb, const gmx::GpuBonded *gpuBonded, Nbnxm::InteractionLocality iLocality) |
Set up internal flags that indicate what type of short-range work there is. More... | |
bool | Nbnxm::haveGpuShortRangeWork (const gmx_nbnxn_gpu_t *nb, Nbnxm::AtomLocality aLocality) |
Returns true if there is GPU short-range work for the given atom locality. More... | |
void | Nbnxm::nbnxn_gpu_init_add_nbat_f_to_f (const int *cell, gmx_nbnxn_gpu_t *gpu_nbv, int natoms_total) |
Initialization for F buffer operations on GPU. | |
void | Nbnxm::nbnxn_gpu_add_nbat_f_to_f (AtomLocality atomLocality, DeviceBuffer< float > totalForcesDevice, gmx_nbnxn_gpu_t *gpu_nbv, void *pmeForcesDevice, GpuEventSynchronizer *pmeForcesReady, int atomStart, int numAtoms, bool useGpuFPmeReduction, bool accumulateForce) |
Force buffer operations on GPU. More... | |
DeviceBuffer< float > | Nbnxm::nbnxn_gpu_get_f_gpu (gmx_nbnxn_gpu_t *gpu_nbv) |
Getter for the device coordinates buffer. More... | |
void | Nbnxm::nbnxn_launch_copy_f_to_gpu (AtomLocality atomLocality, const Nbnxm::GridSet &gridSet, gmx_nbnxn_gpu_t *nb, rvec *f) |
Copy force buffer from CPU to GPU. | |
void | Nbnxm::nbnxn_launch_copy_f_from_gpu (AtomLocality atomLocality, const Nbnxm::GridSet &gridSet, gmx_nbnxn_gpu_t *nb, rvec *f) |
Copy force buffer from GPU to CPU. | |
void | Nbnxm::nbnxn_launch_copy_x_from_gpu (AtomLocality atomLocality, const Nbnxm::GridSet &gridSet, gmx_nbnxn_gpu_t *nb, rvec *x) |
Asynchronous launch of copying coordinate buffer from GPU to CPU. More... | |
void | Nbnxm::nbnxn_wait_for_gpu_force_reduction (AtomLocality atomLocality, gmx_nbnxn_gpu_t *nb) |
Wait for GPU stream to complete. | |
void | Nbnxm::nbnxn_wait_x_on_device (gmx_nbnxn_gpu_t *nb) |
sync CPU thread on coordinate copy to device More... | |
void * | Nbnxm::nbnxn_get_x_on_device_event (const gmx_nbnxn_gpu_t *nb) |
return pointer to event recorded when coordinates have been copied to device More... | |
void * | Nbnxm::nbnxn_get_gpu_xrvec (gmx_nbnxn_gpu_t *nb) |
return GPU pointer to x in rvec format More... | |
void | Nbnxm::nbnxn_wait_nonlocal_x_copy_D2H_done (gmx_nbnxn_gpu_t *nb) |
Wait for non-local copy of coordinate buffer from device to host. More... | |
void * | Nbnxm::nbnxn_get_gpu_frvec (gmx_nbnxn_gpu_t *nb) |
return GPU pointer to f in rvec format More... | |
void | Nbnxm::nbnxn_stream_local_wait_for_nonlocal (gmx_nbnxn_gpu_t *nb) |
Ensure local stream waits for non-local stream. More... | |