Project

General

Profile

Task #2522

Feature #2054: PME on GPU

Task #2453: PME OpenCL porting effort

OpenCL context duplication

Added by Aleksei Iupinov almost 2 years ago. Updated 21 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
uncategorized
Close

Description

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:
https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/classDiagram.html
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.


Related issues

Related to GROMACS - Feature #3115: Device stream managerNew

Associated revisions

Revision b2a95c76 (diff)
Added by Aleksei Iupinov almost 2 years ago

Support persistent device context-derived data in PME tests

PME OpenCL will need to not recompile kernels for running each
unit test. With this in mind, a persistent PmeGpuProgram class
is tasked with GPU kernel setup, and passed around, using a typedef.
The purpose of the class is to hold the PME program data that should
only be set up once and live forever for the given device context.
PmeGpuProgramImpl structure is now tasked with managing
function pointers to the CUDA kernels' instances, and will later
be tasked with compiling OpenCL kernels.

Refs #2453, #2522

Change-Id: I85a01bfc92ec3a108825414b14e2be3731433c9a

Revision 6975fbfd (diff)
Added by Artem Zhmurov 21 days ago

Take over management of OpenCL context from PME and NBNXM

This patch set creates the DeviceContext in runner and passes it to the
consumers (PME and NBNXM). This removes unnessesary management code
duplication, makes the device buffers in two modules compatible.

Fixes #2522
Fixes #3315
Refs #3311

Change-Id: I10358cfaced5b5c7dbdddf95679c9a9703f3a2c0

History

#1 Updated by Aleksei Iupinov almost 2 years ago

  • Description updated (diff)

#2 Updated by Aleksei Iupinov almost 2 years ago

  • Description updated (diff)

#3 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '19' for Issue #2522.
Uploader: Mark Abraham ()
Change-Id: gromacs~master~I85a01bfc92ec3a108825414b14e2be3731433c9a
Gerrit URL: https://gerrit.gromacs.org/7818

#4 Updated by Mark Abraham over 1 year ago

  • Target version changed from 2019 to 2020

#5 Updated by Szilárd Páll 6 months ago

#6 Updated by Paul Bauer 3 months ago

  • Target version changed from 2020 to future

#7 Updated by Artem Zhmurov 21 days ago

  • Status changed from New to Resolved

Also available in: Atom PDF