dpctl.SyclQueue.submit_async¶
- SyclQueue.submit_async(kernel, args, gS, lS=None, dEvents=None)¶
Asynchronously submit
dpctl.program.SyclKernel
for execution.- Parameters:
kernel (dpctl.program.SyclKernel) – SYCL kernel object
args (List[object]) – List of kernel arguments
gS (List[int]) – Global iteration range. Must be a list of length 1, 2, or 3.
lS (List[int], optional) – Local iteration range. Must be
None
or have the same length asgS
and each element ofgS
must be divisible by respective element oflS
.dEvents (List[dpctl.SyclEvent], optional) – List of events indicating ordering of this task relative to tasks associated with specified events.
- Returns:
An event associated with submission of the kernel.
- Return type:
Note
One must ensure that the lifetime of all kernel arguments extends after the submitted task completes. It is not a concern for scalar arguments since they are passed by value, but for objects representing USM allocations which are passed to the kernel as unified address space pointers.
One way of accomplishing this is to use
dpctl.SyclQueue._submit_keep_args_alive()
.