Перейти к содержимому
Compvision.ru
tesmai4

CUDA Stream in OpenCV for multi-threading

Recommended Posts

I am trying to run a multithreaded application using OpenCV with its GPU module. I run one thread for each image file being processed. The application is working fine on CPU. I keep the same logice and change the image processing part from CPU to GPU module of OpenCV. My applciation crashes for more than 2 threads in GPU module.

Most forums relate it to "out of memory" error. This is not the case for my application as only 495MB out 1GB GPU RAM is being used.

I have described my error in [this thread as well.](http://answers.opencv.org/question/34363/program-cashing-in-gpu-api-call-line-unknown-error/)

Some forums suggest using CUDA streams in multi-threaded version of the applicaion for running multiple threads in the application. Can someone provide some example for it?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

I didn't use CUDA so intensive, but you can get a good course about CUDA programming here.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Thanks Smorodov for your reply.

I have video streams and want to process those on GPU. My focus is more on GPU module of OpenCV. I create a separate thread [using pthreads] for processing each file. I can process two files and there is no crash. My program crashes in OpenCV module of 3rd/4th thread when running more than two threads in the program. I provided error details here

My focus is to run as many parallel threads as possible using pthreads or any other option. I mentioned CUDA streams as that was one of the option to run multiple kernels on GPU.

I didn't use CUDA so intensive, but you can get a good course about CUDA programming here.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Создайте учётную запись или войдите для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать учётную запись

Зарегистрируйтесь для создания учётной записи. Это просто!

Зарегистрировать учётную запись

Войти

Уже зарегистрированы? Войдите здесь.

Войти сейчас


  • Сейчас на странице   0 пользователей

    Нет пользователей, просматривающих эту страницу

×