I set cv::ocl::setUseOpenCL(false); and verified using useOpenCL(). But my code is still using GPU when I use UMat. How can I stop using GPU? Temporarily I am using a workaround that uses Mat instead of UMat. UMat should not use GPU when ocl is not used.
Just use UMat in your code. Do some computation. Set cv::ocl::setUseOpenCL(false).
I used GPU-Z to verify GPU load/usage.
I checked this with GPU-Z using Visual Studio (32bit), Windows 7 and OpenCV 3.2 for build and it does not use GPU when I set ocl::setUseOpenCL(false). Same for Visual Studio 2013 (32bit), Windows 7 and OpenCV 3.1.
But three things you should consider:
Most helpful comment
I checked this with GPU-Z using Visual Studio (32bit), Windows 7 and OpenCV 3.2 for build and it does not use GPU when I set ocl::setUseOpenCL(false). Same for Visual Studio 2013 (32bit), Windows 7 and OpenCV 3.1.
But three things you should consider: