Make use of the DeviceStreamManager
authorArtem Zhmurov <zhmurov@gmail.com>
Mon, 24 Feb 2020 09:22:40 +0000 (10:22 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Wed, 25 Mar 2020 06:47:15 +0000 (07:47 +0100)
commitdb2c0d2ea17687201da8a242d6c79c9cd7e0f7a9
treed707c7a96982d1cad4d74bf01a401752c3a80688
parent8bb76094cfe522c71546c99e19f4dc8beb12ab92
Make use of the DeviceStreamManager

Use the DeviceStreamManager throughout the code. The manager is
owned by the runner and created when GPU is active. The consumers
get the context and streams if needed.

TODOs:
1. Make builders and move the selection on whether the stream should
   be created there. The builders should take the manager and pass
   the context and the stream to the consumer. Builders should have
   the option to create a stream.
2. Makefile in ewald tests uses old infrastructure. Also, the device
   context management should be lifted from there and utilized in
   all the tests that can run on GPU hardware.

Refs #3316
Refs #3311

Change-Id: I0d08adbe1dee19c1890e55f0e0cf79cea97d39bd
48 files changed:
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec.h
src/gromacs/ewald/pme.cpp
src/gromacs/ewald/pme.h
src/gromacs/ewald/pme_gpu.cpp
src/gromacs/ewald/pme_gpu_internal.cpp
src/gromacs/ewald/pme_gpu_internal.h
src/gromacs/ewald/pme_gpu_types_host.h
src/gromacs/ewald/pme_gpu_types_host_impl.h
src/gromacs/ewald/pme_only.cpp
src/gromacs/ewald/pme_only.h
src/gromacs/ewald/pme_pp_comm_gpu.h
src/gromacs/ewald/pme_pp_comm_gpu_impl.cpp
src/gromacs/ewald/pme_pp_comm_gpu_impl.cu
src/gromacs/ewald/pme_pp_comm_gpu_impl.h
src/gromacs/ewald/tests/CMakeLists.txt
src/gromacs/ewald/tests/pmegathertest.cpp
src/gromacs/ewald/tests/pmesolvetest.cpp
src/gromacs/ewald/tests/pmesplinespreadtest.cpp
src/gromacs/ewald/tests/pmetestcommon.cpp
src/gromacs/ewald/tests/pmetestcommon.h
src/gromacs/ewald/tests/testhardwarecontext.cpp [new file with mode: 0644]
src/gromacs/ewald/tests/testhardwarecontext.h [new file with mode: 0644]
src/gromacs/ewald/tests/testhardwarecontexts.cpp
src/gromacs/ewald/tests/testhardwarecontexts.h
src/gromacs/gpu_utils/device_stream.cpp
src/gromacs/gpu_utils/device_stream_manager.cpp
src/gromacs/gpu_utils/device_stream_manager.h
src/gromacs/gpu_utils/tests/device_stream_manager.cpp
src/gromacs/listed_forces/gpubonded_impl.cu
src/gromacs/mdlib/update_constrain_gpu_impl.cu
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdtypes/forcerec.h
src/gromacs/mdtypes/state_propagator_data_gpu.h
src/gromacs/mdtypes/state_propagator_data_gpu_impl.cpp
src/gromacs/mdtypes/state_propagator_data_gpu_impl.h
src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp
src/gromacs/nbnxm/cuda/nbnxm_cuda.cu
src/gromacs/nbnxm/cuda/nbnxm_cuda_data_mgmt.cu
src/gromacs/nbnxm/cuda/nbnxm_cuda_types.h
src/gromacs/nbnxm/gpu_common.h
src/gromacs/nbnxm/gpu_data_mgmt.h
src/gromacs/nbnxm/nbnxm.h
src/gromacs/nbnxm/nbnxm_setup.cpp
src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp
src/gromacs/nbnxm/opencl/nbnxm_ocl_data_mgmt.cpp
src/gromacs/nbnxm/opencl/nbnxm_ocl_types.h