This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

hipeventelapsedtime Interface Reference

hipeventelapsedtime Interface Reference#

HIPFORT API Reference: hipfort::hipeventelapsedtime Interface Reference
hipfort::hipeventelapsedtime Interface Reference

Return the elapsed time between two events. More...

Public Member Functions

integer(kind(hipsuccess)) function hipeventelapsedtime_ (ms, start, myStop)
 

Detailed Description

Return the elapsed time between two events.

Parameters
[out]ms: Return time between start and stop in ms.
[in]start: Start event.
[in]stop: Stop event.
Returns
hipSuccess, hipErrorInvalidValue, hipErrorNotReady, hipErrorInvalidHandle, hipErrorNotInitialized, hipErrorLaunchFailure

Computes the elapsed time between two events. Time is computed in ms, with a resolution of approximately 1 us.

Events which are recorded in a NULL stream will block until all commands on all other streams complete execution, and then record the timestamp.

Events which are recorded in a non-NULL stream will record their timestamp when they reach the head of the specified stream, after all previous commands in that stream have completed executing. Thus the time that the event recorded may be significantly after the host calls hipEventRecord().

If hipEventRecord() has not been called on either event, then hipErrorInvalidHandle is returned. If hipEventRecord() has been called on both events, but the timestamp has not yet been recorded on one or both events (that is, hipEventQuery() would return hipErrorNotReady on at least one of the events), then hipErrorNotReady is returned.

Note, for HIP Events used in kernel dispatch using hipExtLaunchKernelGGL/hipExtLaunchKernel, events passed in hipExtLaunchKernelGGL/hipExtLaunchKernel are not explicitly recorded and should only be used to get elapsed time for that specific launch. In case events are used across multiple dispatches, for example, start and stop events from different hipExtLaunchKernelGGL/ hipExtLaunchKernel calls, they will be treated as invalid unrecorded events, HIP will throw error "hipErrorInvalidHandle" from hipEventElapsedTime.

See also
hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord, hipEventSynchronize

Member Function/Subroutine Documentation

◆ hipeventelapsedtime_()

integer(kind(hipsuccess)) function hipfort::hipeventelapsedtime::hipeventelapsedtime_ ( type(c_ptr), value  ms,
type(c_ptr), value  start,
type(c_ptr), value  myStop 
)

The documentation for this interface was generated from the following file: