Unify coordinate copy handling across GPU platforms
authorSzilárd Páll <pall.szilard@gmail.com>
Tue, 26 Oct 2021 21:52:34 +0000 (23:52 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Wed, 27 Oct 2021 16:02:37 +0000 (16:02 +0000)
commit0d86b360f5da797960a7d5dc3520690439bbbc1f
tree7ad9b2bcdaf0faeda5bc336706d9aacd598bd804
parent2acfc914079ae665c4f2ce16ec951565eaebbbff
Unify coordinate copy handling across GPU platforms

Instead of handling the OpenCL host to device copy as a special case
where this operation is issued in the PME stream, as the "Update" stream
is anyway created unconditionally it makes sense to simplify codepaths
at the negligible cost of an extra GPU-side synchronization.

This allows unifying the coordinate handling in stateGpu as well as in
PME spread (with combined PP+PME) which removes some complexity and makes
it easier to reason about event consumption, reducing the need for balancing
workarounds.

The change also introduces a data member in StatePropagatorDataGpu to
indicate whether it is use on a separate PME rank, case in which marking
of the coordinate H2D event can be skipped as no event dependency is
required.

Refs #3988
src/gromacs/ewald/pme_gpu.cpp
src/gromacs/ewald/pme_gpu_internal.cpp
src/gromacs/mdtypes/state_propagator_data_gpu_impl.h
src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp