device_sync Subroutine

public subroutine device_sync()

Waits until the device work queued so far has completed.

A target region without nowait should complete before the host carries on, but CCE was seen to return as soon as the kernel is queued (perf_penta timed 100 solves at 0.1 ms on an MI210, with correct results). OpenMP has no call to wait for the device, so this queues a region whose result the host must have: it runs after the work queued before it, and the host cannot pass it until it has.

Arguments

None

Calls

proc~~device_sync~~CallsGraph proc~device_sync m_omptgt_common::device_sync proc~abort_run m_logger::abort_run proc~device_sync->proc~abort_run interface~str m_logger::str proc~abort_run->interface~str mpi_abort mpi_abort proc~abort_run->mpi_abort mpi_barrier mpi_barrier proc~abort_run->mpi_barrier mpi_comm_rank mpi_comm_rank proc~abort_run->mpi_comm_rank mpi_comm_size mpi_comm_size proc~abort_run->mpi_comm_size mpi_finalized mpi_finalized proc~abort_run->mpi_finalized mpi_initialized mpi_initialized proc~abort_run->mpi_initialized

Called by

proc~~device_sync~~CalledByGraph proc~device_sync m_omptgt_common::device_sync proc~sendrecv_3fields~2 m_omptgt_sendrecv::sendrecv_3fields proc~sendrecv_3fields~2->proc~device_sync proc~sendrecv_fields~3 m_omptgt_sendrecv::sendrecv_fields proc~sendrecv_fields~3->proc~device_sync proc~exec_dist_tds_compact m_omptgt_exec_dist::exec_dist_tds_compact proc~exec_dist_tds_compact->proc~sendrecv_fields~3 proc~exec_dist_transeq_3fused m_omptgt_exec_dist::exec_dist_transeq_3fused proc~exec_dist_transeq_3fused->proc~sendrecv_3fields~2