Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::MdGpuGraph::Impl Class Reference

Description

Impl class stub.

Public Types

using Graph = void *
 
using GraphInstance = void *
 

Public Member Functions

 Impl (const DeviceStreamManager &deviceStreamManager, SimulationWorkload simulationWork, MPI_Comm mpiComm, MdGraphEvenOrOddStep evenOrOddStep, gmx_wallcycle *wcycle)
 Create MD graph object. More...
 
void reset ()
 Reset graph.
 
void disableForDomainIfAnyPpRankHasCpuForces (bool disableGraphAcrossAllPpRanks)
 Disable graph across all PP ranks for this domain, due to presence of CPU forces on any PP rank. More...
 
bool captureThisStep (bool canUseGraphThisStep)
 Decide whether graph will be captured this step. More...
 
void setUsedGraphLastStep (bool usedGraphLastStep)
 Set whether graph was used in the previous step. More...
 
void startRecord (GpuEventSynchronizer *xReadyOnDeviceEvent)
 Denote start of graph region, starts graph recording, and forks those streams involved in graph. More...
 
void endRecord ()
 Join streams involved in graph, and end recording.
 
void createExecutableGraph (bool forceGraphReinstantiation)
 Create executable graph from recorded graph. More...
 
void launchGraphMdStep (GpuEventSynchronizer *xUpdatedOnDeviceEvent)
 Launch graph corresponding to MD step. More...
 
bool useGraphThisStep () const
 Whether graph is in use this step.
 
bool graphIsCapturingThisStep () const
 Whether graph is capturing.
 
void setAlternateStepPpTaskCompletionEvent (GpuEventSynchronizer *event)
 Set PP task completion event for graph on alternate step.
 
GpuEventSynchronizer * getPpTaskCompletionEvent ()
 Getter for task completion event for this graph. More...
 

Constructor & Destructor Documentation

gmx::MdGpuGraph::Impl::Impl ( const DeviceStreamManager deviceStreamManager,
SimulationWorkload  simulationWork,
MPI_Comm  mpiComm,
MdGraphEvenOrOddStep  evenOrOddStep,
gmx_wallcycle *  wcycle 
)

Create MD graph object.

Parameters
[in]deviceStreamManagerDevice stream manager object
[in]simulationWorkSimulation workload structure
[in]mpiCommMPI communicator for PP domain decomposition
[in]evenOrOddStepWhether this graph corresponds to even or odd step
[in]wcycleWall cycle timer object

Member Function Documentation

bool gmx::MdGpuGraph::Impl::captureThisStep ( bool  canUseGraphThisStep)

Decide whether graph will be captured this step.

Parameters
[in]canUseGraphThisStepWhether graph can be used this step
Returns
Whether graph will be captured this step
void gmx::MdGpuGraph::Impl::createExecutableGraph ( bool  forceGraphReinstantiation)

Create executable graph from recorded graph.

Parameters
[in]forceGraphReinstantiationWhether graph reinstantiation should be used instead of graph exec update
void gmx::MdGpuGraph::Impl::disableForDomainIfAnyPpRankHasCpuForces ( bool  disableGraphAcrossAllPpRanks)

Disable graph across all PP ranks for this domain, due to presence of CPU forces on any PP rank.

Parameters
[in]disableGraphAcrossAllPpRanksWhether graph usage should be disabled across all PP ranks
GpuEventSynchronizer* gmx::MdGpuGraph::Impl::getPpTaskCompletionEvent ( )

Getter for task completion event for this graph.

Returns
ppTaskCompletionEvent_
void gmx::MdGpuGraph::Impl::launchGraphMdStep ( GpuEventSynchronizer *  xUpdatedOnDeviceEvent)

Launch graph corresponding to MD step.

   \param [inout] xUpdatedOnDeviceEvent  Event marked when coordinates have been updated o\

n device

void gmx::MdGpuGraph::Impl::setUsedGraphLastStep ( bool  usedGraphLastStep)

Set whether graph was used in the previous step.

Parameters
[in]usedGraphLastStepWhether graph was used in the last step
void gmx::MdGpuGraph::Impl::startRecord ( GpuEventSynchronizer *  xReadyOnDeviceEvent)

Denote start of graph region, starts graph recording, and forks those streams involved in graph.

Parameters
[in]xReadyOnDeviceEventEvent marked when coordinates are ready on device

The documentation for this class was generated from the following files: