- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again!
I want to have two kernels that one starts over the other (not parallel/concurrent). This restriction is imposed because kernel1 and kernel will share the same buffer. So, kernel1 starts do its operations and update the buffer, then instead of coming back to the host, i want to send a flag from kernel1 to the kernel2 by a channel saying that kernel1 finished and kernel2 must start. Do i have to got two command queues for each kernel? Thanks in advanceLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the two kernels are not going to overlap, then there is no need to do this. Just enqueue both kernels in the same queue one after the other, and the second kernel will automatically launch after the first one finishes execution in which case the shared buffer will have been fully updated by the time the second kernel starts.
Note that global memory consistency in OpenCL is only guaranteed *after* kernel execution; trying to synchronize global memory between two kernels using messages sent via channels will *not* work (I tried it once, got incorrect results).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- If the two kernels are not going to overlap, then there is no need to do this. Just enqueue both kernels in the same queue one after the other, and the second kernel will automatically launch after the first one finishes execution in which case the shared buffer will have been fully updated by the time the second kernel starts. Note that global memory consistency in OpenCL is only guaranteed *after* kernel execution; trying to synchronize global memory between two kernels using messages sent via channels will *not* work (I tried it once, got incorrect results). --- Quote End --- Thanks HRZ, case solved :cool:

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page