Profiling multi threaded OpenCV GPU module application
Dear All,
I am trying to run a multi-threaded application using OpenCV GPU module. The application is developed in Visual Studio 2012 professionl + CUDA 5.5 + OpenCV 2.4.6 and uses pthreads for multi-threading. I built OpenCV 2.4.6 for this environment.
My application executes with two threads and there are no exceptions. I start getting a number of CUDA related exceptions with 3 or more than three threads.
I create a thread for each video stream. Read video stream into buffers and start analysing the video frames one after the other on GPU. Below is how analysis is done:
(for all video frames)
{
1) Read video frame from buffer
2) Copy one video frame to GPU
3) Perform analysis
4) Download the results
}
I am having problems with OpenCV GPU module implementation (see below). Does anybody know how to profile CUDA code from within OpenCV module?
Alternatively, Can anybody suggest an alternate implementation?
I am trying to run a multi-threaded application using OpenCV GPU module. The application is developed in Visual Studio 2012 professionl + CUDA 5.5 + OpenCV 2.4.6 and uses pthreads for multi-threading. I built OpenCV 2.4.6 for this environment.
My application executes with two threads and there are no exceptions. I start getting a number of CUDA related exceptions with 3 or more that three threads.
OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=4, file=C:/opencv-2.4.6/modules/gpu/src/nvidia/NCVHaarObjectDetection.cu, line=1306) in unknown function, file C:\opencv-2.4.6\modules\gpu\src\cascadeclassifier.cpp, line 173
OpenCV Error: Gpu API call (unspecified launch failure) in unknown function, file C:\opencv-2.4.6\modules\core\src\gpumat.cpp, line 1196
OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=4, file=C:/opencv-2.4.6/modules/gpu/src/nvidia/NCVHaarObjectDetection.cu, line=1306) in unknown function, file C:\opencv-2.4.6\modules\gpu\src\cascadeclassifier.cpp, line 173
OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=4, file=C:/opencv-2.4.6/modules/gpu/src/nvidia/NCVHaarObjectDetection.cu, line=1523) in unknown function, file C:\opencv-2.4.6\modules\gpu\src\cascadeclassifier.cpp, line 173
OpenCV Error: Gpu API call (unspecified launch failure) in unknown function, file C:\opencv-2.4.6\modules\core\src\gpumat.cpp, line 1415
OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=4, file=C:/opencv-2.4.6/modules/gpu/src/nvidia/NCVHaarObjectDetection.cu, line=1523) in unknown function, file C:\opencv-2.4.6\modules\gpu\src\cascadeclassifier.cpp, line 173
OpenCV Error: Gpu API call (NCV Assertion Failed: retcode=2, file=C:/opencv-2.4.6/modules/gpu/src/nvidia/NCVHaarObjectDetection.cu, line=1768) in unknown function, file C:\opencv-2.4.6\modules\gpu\src\cascadeclassifier.cpp, line 173
OpenCV Error: Gpu API call (NCV Assertion Failed: retcode=5, file=C:/opencv-2.4.6/modules/gpu/src/nvidia/NCVHaarObjectDetection.cu, line=1575) in unknown function, file C:\opencv-2.4.6\modules\gpu\src\cascadeclassifier.cpp, line 173
cudaError_t ...