Project

General

Profile

Task #2521

Feature #2054: PME on GPU

Task #2453: PME OpenCL porting effort

Implement alternating PME/NB wait for OpenCL

Added by Aleksei Iupinov 5 months ago. Updated 3 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
simple
Close

Description

In CUDA version, alternating wait is implemented by polling the PME/NB GPU streams for readiness before synchronizing the last one.
In OpenCL, querying the stream state is not available. One can query the state of cl_event which was put in a stream though.
Therefore alternating wait can be reimplemented by using one GpuEventSynchronizer (https://gerrit.gromacs.org/#/c/7768/) per GPU task to mark the end of each computation and growing a method to query its state:

cl_int result;
clGetEventInfo(event_, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(result), &result, nullptr);
return (result == CL_COMPLETE);


Related issues

Related to GROMACS - Task #2527: Rename GpuEventSynchronizer to something more fitting (after mergin PME OpenCL)New

History

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

Aleksei Iupinov wrote:
ing wait can be reimplemented by using one GpuEventSynchronizer (https://gerrit.gromacs.org/#/c/7768/) per GPU task to mark the end of each computation and growing a method to query its state:

Except that it's not a synchronizer anymore so it would be a misuse of the class, hence it doesn't really seem appropriate.

#2 Updated by Aleksei Iupinov 5 months ago

What's wrong with Synchronizer being able to check if there is actually synchronization needed? :-)
I don't think it warrants a rename :-)

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

Aleksei Iupinov wrote:

What's wrong with Synchronizer being able to check if there is actually synchronization needed? :-)
I don't think it warrants a rename :-)

Well, the idea of the alternating poll/wait is exactly the opposite: to check when the sync can be called on the other stream. ;)

#4 Updated by Aleksei Iupinov 5 months ago

  • Related to Task #2527: Rename GpuEventSynchronizer to something more fitting (after mergin PME OpenCL) added

#5 Updated by Gerrit Code Review Bot 3 days ago

Gerrit received a related DRAFT patchset '1' for Issue #2521.
Uploader: Szilárd Páll ()
Change-Id: gromacs~master~I0dc9edc44137a1c2f58699f2ba038c6568dbae7b
Gerrit URL: https://gerrit.gromacs.org/8556

Also available in: Atom PDF