warp.get_event_elapsed_time#

warp.get_event_elapsed_time(start_event, end_event, synchronize=True)[source]#

Get the elapsed time between two recorded events.

Both events must have been previously recorded with record_event() or warp.Stream.record_event().

If synchronize is False, the caller must ensure that device execution has reached end_event prior to calling get_event_elapsed_time().

Parameters:
  • start_event (Event) – The start event.

  • end_event (Event) – The end event.

  • synchronize (bool) – Whether Warp should synchronize on the end_event.

Returns:

The elapsed time in milliseconds with a resolution about 0.5 ms.