dpctl.SyclEvent¶
- class dpctl.SyclEvent(arg=None)¶
Python class representing
sycl::event
. There are multiple ways to create adpctl.SyclEvent
object: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
PyCapsule
with name “SyclEventRef” that carries a pointer to asycl::event
object. 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.SyclEvent
instance, adpctl.SyclEvent
instance, or a namedPyCapsule
called “SyclEventRef”.- Raises:
ValueError – If the
dpctl.SyclEvent
object 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
DPCTLSyclEventRef
pointer as asize_t
.Returns the list of
dpctl.SyclEvent
objects 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_group
finished execution on the device.Returns the 64-bit device timestamp value in nanoseconds when
sycl::command_group
started execution on the device.Returns the 64-bit time value in nanoseconds when
sycl::command_group
was submitted to a queue for execution.