Task #2522

Updated by Aleksei Iupinov over 2 years ago

Current PME OpenCL code creates its own cl_context in PmeGpuProgramImpl, based on input gmx_device_info_t *.
NB with OpenCL also creates its own OpenCL context. OpenCL contexts can correspond to multiple devices:
NB and PME not sharing same cl_context on the rank can even be detrimental - it's possible they would not have access to each other's cl_mem's.
cl_context management should be taken away from PmeGpuProgramImpl/nbnxn_gpu_create_context() and put into a new class, which would get constructed from a set of gmx_device_info_t *.
The instance of this class should get created based on the GPU task assignment.
PME/NB still need to store references to this object to get the cl_context/gmx_device_info_t * out of it.