dpctl.SyclEvent

class dpctl.SyclEvent(arg=None)

Python class representing sycl::event. There are multiple ways to create a dpctl.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 a sycl::event object. The capsule will be renamed upon successful consumption to ensure one-time use. A new named capsule can be constructed by using dpctl.SyclEvent._get_capsule() method.

Parameters:

arg (optional) – Defaults to None. The argument can be a dpctl.SyclEvent instance, a dpctl.SyclEvent instance, or a named PyCapsule 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

addressof_ref()

Returns the address of the C API DPCTLSyclEventRef pointer as a size_t.

get_wait_list()

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

backend

Returns the backend_type enum value for the device associated with this event.

execution_status

Returns the event_status_type enum value for this event.

profiling_info_end

Returns the 64-bit timestamp value in nanoseconds when sycl::command_group finished execution on the device.

profiling_info_start

Returns the 64-bit device timestamp value in nanoseconds when sycl::command_group started execution on the device.

profiling_info_submit

Returns the 64-bit time value in nanoseconds when sycl::command_group was submitted to a queue for execution.