I am trying to execute multiple kernels in parallel. Each kernel is independent of each other. I am trying to execute the kernel on GPU. What I think is out of order execution and enqueue each kernel separately. Is that the way to approach this problem or there can other way around to it?
Asked
Active
Viewed 139 times
0
-
Welcome to SO! Please [avoid](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question) using image of text data at all cost. Please edit your question to replace the image by the code in appropriate formating. – Gabriel Devillers Aug 08 '18 at 20:44
-
Hey, thanks for the suggestion. – user10149483 Aug 09 '18 at 04:43
-
OpenCL is existing to run same kernels on arrays of data. of course u can run multiple kernels in parallel and use events for sync. also u can make super kernel with IF condition which runs different subkernel but thats inefficient – Boris Ivanov Aug 09 '18 at 11:28
-
I know that we can execute multiple kernels in parallel, I just wanted to confirm that what I think of executing kernels in out of order and enqueue each kernel separately is the way to go or I can do that in any other way? – user10149483 Aug 09 '18 at 18:51
1 Answers
0
There are two possible solutions:
Create an out-of-order queue and enqueue both kernels.
Create two queues and enqueue one kernel to each.

0xF
- 3,214
- 1
- 25
- 29