cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

yasirnoman
Journeyman III

Parallel execution of OpenCL kernels of two different programs on a GPU

I have two OpenCL applications that I want to execute in parallel on a GPU. The purpose is to reduce the execution time of two parallelly executing programs in comparison to when both programs are executed one by one. Suppose the name of the first application is A1.c and its kernel is named as a1.cl. Suppose the second application is A2.c and its kernel is named as a2.cl. When I launch both A1.c and A2.c simultaneously, their respective kernels a1.cland a2.cl are not executing in parallel.

My question is how can I execute kernels of two different programs, in parallel, on the GPU.

0 Likes
2 Replies

Need to give more information on your computer setup as per AMD Forum rules: INFORMATION REQUIRED WHEN POSTING A QUESTION

Since your question deals specifically with OpenCL issues. This AMD Forum for Opencl & Vulkan may be a good place to post your question: OpenCL

0 Likes

Hi, yasirqadri,

Having multiple command-queues allows applications to queue multiple independent commands without re...

So, you can submit the call of clEnqueueNDRangeKernel with separate command queues in different threads.

1) Create the separate command queue and thread for kernel a1.cl, call clEnqueueNDRangeKernel

2) Create the separate command queue and thread for kernel a2.cl, call clEnqueueNDRangeKernel