Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Transparent API performance discrepancy

Hello everyone, I'm using OpenCV's TAPI, I have 2 different computers. Laptop1 has an Radeon 8690m with OpenCL C 1.1. Laptop2 has a GTX 1050 (384.130 power setting set to prefer GPU) with OpenCL C 1.2. Both laptops have been compiled with the exact same setting except for the addition of CUDA 8 on laptop2. Both are also running the exact same code on the same version of OpenCV(3.4.2-dev) on Ubuntu 16.04. The OCL module recognizes both GPUs.

Image I'm loading in is a 2048x1536 color

code snippet:

cv::Mat m = cv::imread("img.jpg");//2048x1536
cv::UMat u;

while(1){
   m.copyTo(u)
   startTime();
   cv::GaussianBlur(u, u, cv::Size(3x3), 3.5)
   endTime();
}

on Laptop 1 I get ~24ms. On Laptop2 I get ~34ms. I let the loop run for a couple of seconds. Now the fun begins. On Laptop2 if I change GaussianBlur to use m instead of u my time is ~20ms, while Laptop 1 gets worse performance as expected (complete opposites). Is there some implementation under the hood that could be affecting the performance or is there some other issue? Thanks