Multiple streams on the same GPU

asked 2016-11-26 13:44:24 -0600

Humam Helfawi gravatar image

I have build a simple function that do some processing on GPU via OpenCL (OpenCV T-API). This function looks like:

void do_something(cv::VideoCapture capture_engine);

The GPU usage during calling this function on some stream (video or camera) is around 10%. I want to call this function in parallel for more than one stream (I have multiple cameras). However, there is not any mutual information between streams. Each one of them processes on its own.

How can I trigger this function in parallel for more than one stream and in the same in order to get benefit from the whole GPU (not just 10%)?

edit retag flag offensive close merge delete

Comments

If you have a thread for each videocapture and call opencl in thread it should work?

LBerger gravatar imageLBerger ( 2016-11-26 14:01:42 -0600 )edit

Thanks.. Yes it should work.. But is it the best way to utilize GPU? or it gonna work like serial implementation ?

Humam Helfawi gravatar imageHumam Helfawi ( 2016-11-26 14:28:06 -0600 )edit

No idea. I think a test can be imagined like 3 threads with opencl and without opencl

LBerger gravatar imageLBerger ( 2016-11-26 15:03:00 -0600 )edit