Run CUDA and OpenCL kernels simultaneously

Hello, developers

I have a situation. I have project A and B which run CUDA and OpenCL kernel respectively. My question is if I can run both project simultaneously. I ran two in two different thread simultaneously, and everything looks fine. I thought that two kernel from different thread couldn’t run same time without CUDA concurrency support. Is this possible running CUDA and OpenCL kernel same time?

Thank you for your help

As far as I know separate processes will always have their own device contexts to run in, and these contexts will execute in a time sliced manner on the GPU if both have simultaneous compute requests to the GPU.

Depending on the duration of single kernel calls, this time slicing may not be “fair”. The application with the bigger kernel run times may get more GPU runtime.

The latest GPU models seem to have a preemption feature, but I do not know if this will be used by the driver to interrupt (and later resume) longer running kernels for more fairness.