Fortran-wrapper for waiting for CUDA/HIP stream tasks to complete.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(acc_stream_type), | intent(in) | :: | this |
SUBROUTINE acc_stream_synchronize(this) !! Fortran-wrapper for waiting for CUDA/HIP stream tasks to complete. TYPE(acc_stream_type), & INTENT(IN) :: this #if ! defined (__DBCSR_ACC) MARK_USED(this) DBCSR_ABORT("__DBCSR_ACC not compiled in.") #else INTEGER :: istat IF (.NOT. C_ASSOCIATED(this%cptr)) & DBCSR_ABORT("acc_stream_synchronize: stream not allocated") CALL dbcsr_acc_set_active_device(get_accdrv_active_device_id()) istat = acc_interface_stream_sync(this%cptr) IF (istat /= 0) & DBCSR_ABORT("acc_stream_synchronize failed") #endif END SUBROUTINE acc_stream_synchronize