I'm running cv::cuda::StereoBM, and it works find on a Tesla K80. (Compute capability 3.7.) Precisely the same code, with precisely the same system libraries, it hangs on a Geforce RTX 2080 Ti. (Compute capability 7.5.) I've got other CUDA code working find on the system.

In particular, this is the code that hangs:

cv::Ptr<cv::StereoBM> sbm_ptr = cv::cuda::createStereoBM();
sbm_ptr->compute(gpu_left, gpu_right, gpu_result);
// .. this line of code is never reached.

I've doubled checked OpenCV's cuda::DeviceInfo::isCompatible, and it lists my device as indeed compatible.

I'm wondering how I might go about debugging this.

1 Answers

0
Madhu Soodhan On

I faced a similar hang issue while running StereoBM on Compute capability 7.2. It was working fine on 6.2. I checked OpenCV's GitHub for issues, there seemed to be a racing issue with OpenCV before 3.4.6 version.

You can find the fix in this thread :

https://github.com/opencv/opencv/pull/13850

I added the patch to my existing code. It worked without any hiccups. Hope it helps.