OpenCL barrier problem at stereo matching - conditional barrier arrival needs removal (Bug #2243)
Description
Some OpenCL based OpenCV code (in stereoKernel, but probably in some other places) has the OpenCL barrier accessed under the branch condition. See the following sample below where InitColSSD function has a barrier inside.
1 if (col_ssd_extra > 0)
2 if (x_tex + BLOCK_W < cwidth)
3 InitColSSD(x_tex + BLOCK_W, y_tex, img_step, left, right,d, col_ssd_extra radius);
And according with OpenCL spec at the barrier ALL kernels should stop waiting for ALL other kernels to arrive to the barrier. And in this scenario it never happens resulting in the test system hang-up.The bug may be seen not on all systems cause some OpenCL implementations may kill the hanging kernels after some amount of time. However this is NOT OpenCL default and specified behavior so the bug needs to be fixed.
The simplest way to reproduce it is to run
opencv_ocl\ocl\opencv\modules\gpu\test\test_calib3d.cpp
on Intel OpenCL enabled system
Associated revisions
Merge pull request #2243 from ilya-lavrenov:ocl2trash
History
Updated by Andrey Kamaev over 12 years ago
- Priority changed from High to Normal
- Description changed from Some OpenCL based OpenCV code (in stereoKernel, but probably in some other pl... to Some OpenCL based OpenCV code (in stereoKernel, but probably in some other pl... More
- Assignee set to yao wang
- Category set to ocl
Updated by yao wang about 12 years ago
This piece of code doesn't exist in current ocl module.
- Affected version set to 2.4.3
Updated by yao wang about 12 years ago
- % Done changed from 0 to 100
Updated by Ilya Lavrenov about 11 years ago
Hi Victoria, I agree with Yao, the file you are pointed out was changed a lot of times and I didn't find conditional barriers, so let's close the issue.
- Status changed from Open to Cancelled
- HW Platform set to Any
- Operating System set to Any
- Affected version changed from 2.4.3 to 2.4.0 - 2.4.6