Is cuda::detectMultiScale method thread safe for Cuda?

asked 2017-05-26 01:58:42 -0500

_zen_ gravatar image

updated 2017-05-26 02:15:15 -0500

Hi, I tried sample with threads for CPU all ok, for Cuda I had Assertion:

OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=4, file=/Users/User/Documents/Dev/OpenCV/modules/cudalegacy/src/cuda/NCVHaarObjectDetection.cu, line=1313) in NCVDebugOutputHandler, file /Users/User/Documents/Dev/OpenCV/modules/cudaobjdetect/src/cascadeclassifier.cpp, line 156

If run only one thread for Cuda all ok.

I saw the same problem: https://github.com/opencv/opencv/issu...

but it was in 2015 (

You can see my sample here link text.

Platform: MacOsX OpenCV 3.2.0-dev Cuda: 8.0.61

Other strange situation when I tried use Stream for method cuda::detectMultiScale but I can't use in method I found line CV_Assert( !stream );

edit retag flag offensive close merge delete

Comments

I hope it helps : read this issue and this one too

LBerger gravatar imageLBerger ( 2017-05-26 02:03:49 -0500 )edit

Thanks, but I can't use Stream I wrote in the end question but I didn't try remove line CV_Assert( !stream ); May be it is not right change source OpenCV but I will thinking about it.

_zen_ gravatar image_zen_ ( 2017-05-26 02:11:09 -0500 )edit

right or not try it if it works write an issue

LBerger gravatar imageLBerger ( 2017-05-26 02:57:40 -0500 )edit

If I comment line with assert I see the same above assert:

OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=4, file=/Users/User/Documents/Dev/OpenCV/modules/cudalegacy/src/cuda/NCVHaarObjectDetection.cu, line=1313) in NCVDebugOutputHandler, file /Users/User/Documents/Dev/OpenCV/modules/cudaobjdetect/src/cascadeclassifier.cpp, line 156

Seems with streams and without detectMultiScale doesn't thread safe (

_zen_ gravatar image_zen_ ( 2017-05-26 07:10:05 -0500 )edit