diff options
author | Yang, Rong R <rong.r.yang@intel.com> | 2016-11-28 19:32:43 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-12-30 16:22:01 +0800 |
commit | f8aa5ad2454967d638d214390823cbb93af3e76a (patch) | |
tree | 7245f3d96ee6bee5b8349b169030cc2ed44ca229 /src/cl_enqueue.h | |
parent | 4d5c6b87d9429867d9411dd70746d344bece780d (diff) | |
download | beignet-f8aa5ad2454967d638d214390823cbb93af3e76a.tar.gz |
OCL20: handle device enqueue in runtime.
There are some step to handle device enqueue:
1. allocate the device enqueue bo to store the device enqueue
information for parent kernel. Add must convert all global buffers to
SVM buffers to make sure the child kernels have the same GPU address.
2. When flush the command, check whether have device enqueue or not. If
has device enqueue, must wait finish and parse the device enqueue info.
3. Start the child ndrange according the device enqueue info, and the
parent's global buffers as the exec info.
Because of non uniform workgroup size, one enqueue api will flush
serveral times, but device enqueue only need handle once, so add a flag
to function cl_command_queue_flush to indicate the last flush.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
Diffstat (limited to 'src/cl_enqueue.h')
-rw-r--r-- | src/cl_enqueue.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cl_enqueue.h b/src/cl_enqueue.h index 63a491c1..50a54fcd 100644 --- a/src/cl_enqueue.h +++ b/src/cl_enqueue.h @@ -78,6 +78,9 @@ typedef struct _enqueue_data { void *svm_pointers[], void *user_data); /* pointer to pfn_free_func of clEnqueueSVMFree */ cl_gpgpu gpgpu; + cl_bool mid_event_of_enq; /* For non-uniform ndrange, one enqueue have a sequence event, the + last event need to parse device enqueue information. + 0 : last event; 1: non-last event */ } enqueue_data; /* Do real enqueue commands */ |