My company has a Windows application that uses Deep Neural Network and computer vision for image segmentation. The application employs OpenCV and OpenCL and has been running fine until recently we upgrade our OpenCV to version 4.3 from the older version 3.1. We now run into the issue that at the end, the application just fails to quit properly. This issue only happens to AMD GPU devices when using with OpenCL. Intel’s devices and AMD CPU (not running OpenCL) do not have this problem. The application seems just hang at the very last statement (without returning back the prompt to the Windows’s command prompt). I’ve been doing some intensive search but could not find a good solution. One closest hit is like this thread Opencl ReleaseCommandQueue hangs - AMD Community . Posted more messages in AMD developer forum but I also try here to see if anyone can help with a couple questions here:
if anyone has run into similar problem and has ideas what could be the issue and/or where to troubleshoot?
Why it happens to OpenCV 4.3 but not 3.1?
Or do we need to have more updated version of OpenCL to work with OpenCV 4.3?
The application is mainly C++ and built with VS 2017 and the issue happens for both 32 and 64 bit.
same issue here, Win10 using ocv 4.8.1 + VS2022 OpenCL target with Intel iGPU, 11900k
The dnn runs are significantly faster than the CPU target, no deadlock w RTX 4070Ti
It looks a deadlock here:
opencv_world481d.dll!cv::ocl::Program::Impl::~Impl() Line 4756
you both might want to approach the OpenCV developers with a bug report on this.
bug report should come with MRE and description of the environment. you should make sure to reproduce this on the latest release. also check existing issues for mentions of your issue.