Description
dpctl.SyclEvent
needs to closely follow SYCL interface.
C-API changes needed
-
In C-API we need
DPCTLEvent_Copy
. -
We should either use
e.wait_and_throw()
inDPCTLEvent_Wait
, or introduceDPCTLEvent_WaitAndThrow(ERef)
. -
Since
sycl::event
is a associated with a SYCL backend, we should supportDPCTLEvent_GetBackend(ERef)
. -
sycl::event::get_wait_list()
returning a vector of events, should be exposed viaDPCTLEvent_GetWaitList(ERef)
. -
sycl::event::get_info<sycl::info::event::command_execution_status>()
returning anenum class event_command_status : int { submitted, running, complete}
should be exposed viaDPCTLEvent_GetCommandExecutionStatus(ERef)
. -
sycl::event::get_profiling_info<sycl::info::event_profiling::command_submit>()
,sycl::event::get_profiling_info<sycl::info::event_profiling::command_start>()
andsycl::event::get_profiling_info<sycl::info::event_profiling::command_end>()
returninguint64_t
value of device timer corresponding to the logged time of referenced operations. These are blocking operations (i.e. wait on the event), and throwsycl::invalid_object_code
if the queue that created the event did not have profiling enabled.
Python API changes needed
-
dpctl.SyclEvent()
should create object corresponding tosycl::event()
. -
dpctl.SyclEvent( _SyclEvent )
should copy event from_SyclEvent
like other constructors do._SyclEvent
is the helper data owner responsible for callingDPCTLEvent_Delete
. Do not think__dealloc__
needs to callDPCTLEvent_Wait()
. -
dpctl.SyclEvent( event_capsule )
whereevent_capsule
is named"SyclEventRef"
and stores pointer tosycl::event
object should create adpctl.SyclEvent
carrying a copy of thatsycl::event
object. -
dpctl.SyclEvent.execution_status
should return either an enum, or a string -
dpctl.SyclEvent.profiled_info.submit
,dpctl.SyclEvent.profiled_info.start
,dpctl.SyclEvent.profiled_info.end
would return profiling data. -
dpctl.SyclEvent.get_backend()
should return backend enum. - I think
dpctl.SyclEvent.wait()
should calle.wait_and_throw()
. -
dpctl.SyclEvent.wait_list()
should return a list ofdpctl.SyclEvent
instances - Static method
dpctl.SyclEvent.wait( event or a list of events )
should be implement for synchronouslywait_and_throw
on the given event or list of events.
N.B.: The functionality to combine multiple events into a single event perhaps belongs to dpctl.SyclQueue
, where it would submit an empty single_task
, and use depends_on
the given list of events.