dpctl.SyclEvent¶
- class dpctl.SyclEvent(arg=None)¶
Python class representing
sycl::event. There are multiple ways to create adpctl.SyclEventobject:Invoking the constructor with no arguments creates a ready event using the default constructor of the
sycl::event.
- Example:
import dpctl # Create a default SyclEvent e = dpctl.SyclEvent()
Invoking the constructor with a named
PyCapsulewith name “SyclEventRef” that carries a pointer to asycl::eventobject. The capsule will be renamed upon successful consumption to ensure one-time use. A new named capsule can be constructed by usingdpctl.SyclEvent._get_capsule()method.
- Parameters:
arg (optional) – Defaults to
None. The argument can be adpctl.SyclEventinstance, adpctl.SyclEventinstance, or a namedPyCapsulecalled “SyclEventRef”.- Raises:
ValueError – If the
dpctl.SyclEventobject creation failed.TypeError – In case of incorrect arguments given to constructors, unexpected types of input arguments, or in the case the input capsule contained a null pointer or could not be renamed.
Methods
Returns the address of the C API
DPCTLSyclEventRefpointer as asize_t.Returns the list of
dpctl.SyclEventobjects that depend on this event.wait()Synchronously wait for completion of this event.
wait_for(event)Waits for a given event or a sequence of events.
Attributes
Returns the backend_type enum value for the device associated with this event.
Returns the event_status_type enum value for this event.
Returns the 64-bit timestamp value in nanoseconds when
sycl::command_groupfinished execution on the device.Returns the 64-bit device timestamp value in nanoseconds when
sycl::command_groupstarted execution on the device.Returns the 64-bit time value in nanoseconds when
sycl::command_groupwas submitted to a queue for execution.