HI, I upload Mat to GpuMat and then change it by CUDA and the I download GpuMat to Mat. I do not have any problem with Mat up to size 1024x1024, but when my Mat is 2048x2048 I get a error after my CUDA code and in download GpuMat to Mat time!
error:
OpenCV(3.4.1) Error: Gpu API call (unspecified launch failure) in cv::cuda::GpuMat::download, file C:/OpenCV 3.4.1/opencv-3.4.1/modules/core/src/cuda/gpu_mat.cu, line 249
Use a cuda debugger appropriate for your platform.
Even though this occurs in some OpenCV code, the “download GpuMat to Mat” is occurring after your own kernel call, and the error is indicative of a problem in your kernel call, not in the OpenCV code. You may simply be hitting a wddm tdr.
I did not get how I check cuda-memcheck in visual studio. But I think if I use cudaMemAllockPitch and cudaMemCpy2D for copy my Mat in Device and Host my problem will solved !